This class is used to implement the Controller portion of the Zen
A dataController component provides a way to establish a connection between a DataModel class and one or more
When the data associated with the Controller changes, these changes are automatically broadcast to all View components connected to the Controller.
For example, the following XML defines a
<dataController id="data" modelClass="MyApp.MyModel" modelId="1"/> <dynaForm id="myForm" controllerId="data"/>
Name of the DataModel class that provides data for this controller.
You can change this value using the client-side
setModelClassmethod. This will cause a new object to be loaded into the controller.
Delete an instance of a DataModel object.
Return a comma-delimited list of the properties contained in the current DataModel class.
A property in the list may include type and label information in the form:
Ask our associated dataModel to create a new (unsaved) instance.
Ask our associated dataModel to delete the item with the given id. Returns true if the delete was successful. If the dataModel is readOnly, then the delete will not happen.
Return the class name of the current model associated with this dataController.
Save data from this dataController back to the DataModel on the server. Return the id with which the model was saved or '' if it was not saved.
This method lets you set the values of both the
modelClassand (if provided) modelIdproperties for this controller. This will cause new data to be loaded and any views connected to this controller to refresh.
This is useful in cases where both the model class and id need to change as this method changes both with a single call to the server.
Set the value of a named property.