This class is used to implement the Model portion of the Zen Model-View-Controller mechanism. More...
Static Public Attributes | |
DOMAIN = None | |
This class is used to implement the Model portion of the Zen Model-View-Controller mechanism. More... | |
DYNAMICPROPERTIES = None | |
If true (the default), then this dataModel class supports dynamic properties: More... | |
![]() | |
READONLYMODEL = None | |
This is the abstract base class used by all model classes within the Zen Model-View-Controller mechanism. More... | |
![]() | |
CAPTION = None | |
Optional name used by the Form Wizard for a class when generating forms. More... | |
JAVATYPE = None | |
The Java type to be used when exported. | |
PROPERTYVALIDATION = None | |
This parameter controls the default validation behavior for the object. More... | |
Private Member Functions | |
_.Library.Status | OnCopyDataFromModel (pData) |
If defined, this callback method is invoked just as this DataModel object. More... | |
_.Library.Status | OnCopyDataToModel (pData) |
If defined, this callback method is invoked just before the dataController. More... | |
_.Library.Status | OnLoadModel (_.Library.RegisteredObject pSource) |
This callback method does the actual work of loading values from the source object. | |
_.Library.RegisteredObject | OnNewSource (_.Library.Status pSC) |
This callback method is invoked when a new instance of DataModel is required. More... | |
_.Library.RegisteredObject | OnOpenSource (_.Library.String pID, _.Library.Integer pConcurrency, _.Library.Status pSC) |
This callback method is invoked when a DataModel is loaded into memory. More... | |
_.Library.Status | OnSaveSource (_.Library.RegisteredObject pSource) |
This callback method is called when the DataModel is saved. More... | |
_.Library.Status | OnStoreModel (_.Library.RegisteredObject pSource) |
This callback method does the actual work of copying values. More... | |
_.Library.Status | OnSubmit (_.ZEN.Submit pSubmit) |
If defined, this callback is called when a form connected to this. More... | |
_.Library.Status | SaveModel () |
Save the values currently within this DataModel object back to a data source. More... | |
Additional Inherited Members | |
![]() | |
_.Library.Status | OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount) |
This callback method is invoked when the current object is added to the SaveSet,. More... | |
_.Library.Status | OnClose () |
This callback method is invoked by the <METHOD>Close</METHOD> method to. More... | |
_.Library.Status | OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned) |
This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More... | |
_.Library.Status | OnNew () |
This callback method is invoked by the <METHOD>New</METHOD> method to. More... | |
_.Library.Status | OnValidateObject () |
This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More... | |
This class is used to implement the Model portion of the Zen Model-View-Controller mechanism.
An ObjectDataModel is specific type of <class>DataModel</class> that contains a set of named values (properties).
The properties of an ObjectDataModel can either be formally defined within the ObjectDataModel class, or they can be "virtual" properties - properties defined at run-time.
When an ObjectDataModel is displayed using a <class>ZEN.Component.dynaForm</class>, the properties will be displayed in the following default ways:
|
staticprivate |
|
staticprivate |
|
staticprivate |
Internal method.
This generated method contructs client-side JS validation code for the properties within this provider. The client-side code is returned as a string that is converted to JS function at run-time.
|
staticprivate |
Return an array, subscripted by property name, describing the properties within this DataModel.
These are returned as an array of the form:
pInfo(name) = seqno
If pExtended is true (1), then the array will include additional nodes for each property. This information is used to create dynamic forms for this model.
Applications should not change this method. To modify the information returned by this method, override the <method>OnGetPropertyInfo</method> callback method.
|
private |
If defined, this callback method is invoked just as this DataModel object.
is about to copy its values into a dataController.
pData is an array containing the values that will be provided to the controller, subscripted by property name.
|
private |
If defined, this callback method is invoked just before the dataController.
copies its values into the properties of this DataModel object.
pData is an array containing the values provided by the controller, subscripted by property name.
|
staticprivate |
|
staticprivate |
|
staticprivate |
This callback method, if present, is called by the <method>GetPropertyInfo</method>
method. This gives subclasses the opportunity to add additional property descriptions to the DataModel.
pIndex is the index number that should be used to add the next property to the list.
pInfo is a multidimensional array containing information about the properties of this data model.
If pExtended is true, then complete information about the properties should be returned; if false, then only property names need be returned (applications can simply ignore this).
pModelId is the id value of the current Data Model instance. This is provided for cases where the contents of a dynamic form may vary by instance of the Data Model object.
|
private |
This callback method is invoked when a new instance of DataModel is required.
If implemented, it returns a new instance of the data source object used by the DataModel.
The default implementation returns the DataModel itself as the source object (this allows for simple DataModel classes that have no actual source object).
Reimplemented from DataModel.
|
private |
This callback method is invoked when a DataModel is loaded into memory.
If implemented, it loads an instance of the data source object used by the DataModel.
The default implementation returns the DataModel itself as the source object (this allows for simple DataModel classes that have no actual source object).
Reimplemented from DataModel.
Reimplemented in Adaptor.
|
private |
|
private |
|
private |
If defined, this callback is called when a form connected to this.
DataModel is submitted.
The contents of this DataModel will be filled in from the submitted values before this callback is invoked.
The default implementation is to store the submitted values back to the model.
Reimplemented from DataModel.
Reimplemented in reportPage.
|
staticprivate |
Open and return an instance of this DataModel object (given an id value pID and.
fill in its property values.
The actual loading of the properties is carried out by the <method>OnLoadModel</method> method. The property values can come from an independent data source object or may be local to this data model object.
If pID is "", then a new instance of data model object should be created.
pConcurrency is an optional concurrency flag that can be used in cases where the data source is a persistent object.
On return, pSC contains a status code indicating success of failure.
Reimplemented from DataModel.
|
private |
Save the values currently within this DataModel object back to a data source.
Before saving, the values of the properties will be validated (as specified by the property definitions).
The actual save operation works as follows:
The <method>OnStoreModel</method> callback is invoked. This copies the properties of this model back to the data source object (if there is an independent data source).
The <method>OnSaveSource</method> callback is invoked. This causes the independent data source object to be saved.
Returns a status code indicating success or failure.
Reimplemented from DataModel.
|
staticprivate |
|
static |
This class is used to implement the Model portion of the Zen Model-View-Controller mechanism.
An ObjectDataModel is specific type of <class>DataModel</class> that contains a set of named values (properties).
The properties of an ObjectDataModel can either be formally defined within the ObjectDataModel class, or they can be "virtual" properties - properties defined at run-time.
When an ObjectDataModel is displayed using a <class>ZEN.Component.dynaForm</class>, the properties will be displayed in the following default ways:
Localization domain.
DataModel classes that wish to support localization must provide a value for this within subclasses.
|
static |
If true (the default), then this dataModel class supports dynamic properties:
that is, you can reference arbitrary property names within the data model object. Any such properties that are not formally defined will refer to a location within the private property, <property>data</property> using the dynamic dispatch mechanism. Set this to false to disable this feature.