The action handler method.
API Tags:
Perform the update action
API Tags:
Returns the edit action, which is called when we want to return the user to the edit form.
Defaults to the 'edit' action.
API Tags:
| Return: | edit action |
| Access: | public |
String getEditPage(
&$record, Array
$record
)
|
|
This method is obsolete. Do not use it. It is only here for backwards compatibility...
Parameters:
API Tags:
| Return: | HTML code for the edit page |
| Deprecated: | |
| Access: | public |
Get the record for updating
API Tags:
| Return: | The record to update |
| Access: | public |
void handleAccessDenied(
)
|
|
Called when the acces to this action was denied for the current user.
API Tags:
void handleCancel(
array
$record
)
|
|
Called when the user clicks cancel
Parameters:
API Tags:
bool handleProcess(
array
$record, [string
$errorHandler = 'handleUpdateError'], [string
$successHandler = "handleUpdateSuccess"], [array
$extraParams = array()]
)
|
|
Process a record (preUpdate/validate/store)
Parameters:
|
array |
$record: |
Record to store |
|
string |
$errorHandler: |
Error handler method to call on current handler |
|
string |
$successHandler: |
Success handler method to call on current handler |
|
array |
$extraParams: |
Extra params to pass along to error/success handler methods |
API Tags:
| Return: | Wether the process succeeded in storing the record |
| Access: | public |
void handleUpdate(
[String
$attrRefreshUrl = null]
)
|
|
Handle the update of a dialog.
Parameters:
API Tags:
void handleUpdateError(
array
$record, [string
$error = null]
)
|
|
Handle update error. This can either be an error in the record data the user can correct or a fatal error when saving the record in the database. If the latter is the case the $error parameter is set.
This method can be overriden inside your node.
Parameters:
|
array |
$record: |
|
|
string |
$error: |
error string (only on fatal errors) |
API Tags:
void handleUpdateSuccess(
array
$record
)
|
|
Handle update success. Normally redirects the user either back to the edit form (when the user only saved) or back to the previous action if the user choose save and close.
This method can be overriden inside your node.
Parameters:
|
array |
$record: |
the record |
API Tags:
bool hasError(
array
$record
)
|
|
Check if there is an error (this can be determined by the variable atkerror in the record).
Parameters:
|
array |
$record: |
Record to check for errors |
API Tags:
| Return: | Error detected? |
| Access: | public |
void loadEditDialogWithErrors(
array
$record
)
|
|
Update the edit dialog for a failed update
Parameters:
|
array |
$record: |
Record that failed update |
API Tags:
void loadSuccessDialog(
$record,
$extraParams, unknown_type
$attrRefreshUrl
)
|
|
Parameters:
|
unknown_type |
$attrRefreshUrl: |
|
|
|
$record: |
|
|
|
$extraParams: |
|
API Tags:
Information Tags:
| Todo: | document.location.href is problematic if you already clicked the save action on a normal edit page. If you use the editdialog after that and you save the dialog, the page will redirect to the index page of the application. |
| Todo: | refresh only the recordlist not the full page. |
void partial_dialog(
String
$mode
)
|
|
Handle the dialog partial
Parameters:
|
String |
$mode: |
The current mode |
void renderEditPage(
&$record, array
$record
)
|
|
This method is obsolete. Do not use it. It is only here for backward compatibility...
Render an editpage
We have to make the entire system think we are in edit mode again.
Parameters:
API Tags:
void setDialogSaveUrl(
string
$url
)
|
|
Override the dialog save url
Parameters:
|
string |
$url: |
dialog save URL |
void setEditAction(
string
$action
)
|
|
Sets the edit action which should be called when we need to return the user to the edit form.
Parameters:
|
string |
$action: |
action name |
API Tags:
mixed updateRecord(
&$record, array
$record
)
|
|
Update a record, determines wether to update it to the session or the database
Parameters:
|
array |
$record: |
Record to update |
|
|
&$record: |
|
API Tags:
| Return: | Result of the update, true, false or string with error |
| Access: | private |
mixed updateRecordInDb(
&$record, array
$record
)
|
|
Update a record in the database
Parameters:
|
array |
$record: |
Record to update |
|
|
&$record: |
|
API Tags:
| Return: | Result of the update, true, false or string with error |
| Access: | private |
mixed updateRecordInSession(
array
$record
)
|
|
Update a record in the session
Parameters:
|
array |
$record: |
Record to update |
API Tags:
| Return: | Result of the update, true or false |
| Access: | private |