This is an AJAX-enabled controller class intended for usage directly with a storage backend. It has no creation support whatsoever, but the multi-edit loop will work without problems. The form will only be synchronized with the datamanager if validation succeeds. (Naturally, types operating directly on blobs / parameters are exempt of this.)
You need to set both datamanager and (thus) schema database before initializing.
package | midcom.helper.datamanager2 |
---|
Array
All field values in their HTML representation indexed by their name.Loads required Javascript libraries and connects to the parent class initialization.
string
The form identifierboolean
Indicating success.If component wishes to do post-processing after an edit, save or preview state in this call it must set the exit parameter to false. view state simply returns processing to component.
The return values in this processor are:
If required, we will here create a form manager instance and save or preview contents
If processing is successful, (that is, only 'save'). If editing was successful, the form is frozen in case you want to display it again (usually you want to redirect to the view target).
There are several possible return values:
The form will be automatically validated for 'save' and 'next', but not for 'previous'. If you want to have save the data for example even during 'next', you need to call datamanager->save after this function returned the according return code.
Normally, all validation should be done during the Form processing, but sometimes this is not possible. These are the cases where type validation rules fail instead of form validation ones. At this time, the integration of type validation is rudimentary and will transparently return edit instead of validation.
todo | Integrate type validation checks cleanly. |
---|
string
One of 'save', 'cancel', 'next', 'previous', 'edit', depending on the schema
configuration.boolean
False if the object isn't AJAX editable