-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
-
FormList set class name e id
-
On Form create onEdit
public function onEdit( $param )
{
try {
if (isset($param['key'])) {
$key = $param['key']; // get the parameter $key
TTransaction::open($this->database); // open a transaction
$object = new Contato($key); // instantiates the Active Record
$this->form->setData($object); // fill the form
TTransaction::close(); // close the transaction
}else{
$this->form->clear();
}
} catch (Exception $e) {
new TMessage(TFormDinMessage::TYPE_ERROR, $e->getMessage()); // shows the exception error message
TTransaction::rollback(); // undo all pending operations
}
}Reactions are currently unavailable