%ZEN.Auxiliary.dataController
class %ZEN.Auxiliary.dataController extends %ZEN.Auxiliary.abstractController
This class is used to implement the Controller portion of the Zen Model-View-Controller mechanism.A dataController component provides a way to establish a connection between a DataModel class and one or more %ZEN.Component.dataView components (such as a form).
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 that will open an instance of the MyApp.MyModel class using an id value of 1. The %ZEN.Component.dynaForm object is bound to the dataController by setting its controllerId property to the id of the dataController:
<dataController id="data" modelClass="MyApp.MyModel" modelId="1"/> <dynaForm id="myForm" controllerId="data"/>
Property Inventory
Method Inventory
- %DeleteModelInstance()
- %GetModelPropertyList()
- createNewObject()
- deleteId()
- getModelClass()
- save()
- setModelClass()
- setProperty()
Properties
property modelClass as %ZEN.Datatype.className (ZENEXPRESSION = 1);
Name of the DataModel class that provides data for this controller.
You can change this value using the client-side setModelClass() method. This will cause a new object to be loaded into the controller.
You can change this value using the client-side setModelClass() method. This will cause a new object to be loaded into the controller.
Property methods: modelClassDisplayToLogical(), modelClassGet(), modelClassIsValid(), modelClassLogicalToDisplay(), modelClassLogicalToOdbc(), modelClassNormalize(), modelClassSet()
Methods
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:
Prop:type:label
A property in the list may include type and label information in the form:
Prop:type:label
clientmethod createNewObject() [ Language = javascript ]
Ask our associated dataModel to create a new (unsaved) instance.
clientmethod deleteId(id) [ Language = javascript ]
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.
clientmethod getModelClass() [ Language = javascript ]
Return the class name of the current model associated with this dataController.
clientmethod save() [ Language = javascript ]
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.
clientmethod setModelClass(cls, id) [ Language = javascript ]
This method lets you set the values of both
the modelClass and (if provided)
modelId properties 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.
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.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
Inherited Members
Inherited Properties
- %condition
- %import
- %includeFiles
- %page
- %resource
- alertOnError
- align
- autoRefresh
- aux
- composite
- containerStyle
- defaultSeries
- dragEnabled
- dropEnabled
- enclosingClass
- enclosingStyle
- error
- height
- hidden
- hint
- hintClass
- hintStyle
- id
- index
- label
- labelClass
- labelDisabledClass
- labelStyle
- modelError
- modelId
- name
- onafterdrag
- onbeforedrag
- oncreate
- ondelete
- ondrag
- ondrop
- onerror
- onhide
- onnotifyController
- onrefresh
- onsave
- onshow
- onupdate
- parent
- readOnly
- showLabel
- slice
- title
- tuple
- valign
- visible
- width
- window
Inherited Methods
- %AddToSaveSet()
- %Attr()
- %BindExport()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %DrawComponentHTML()
- %DrawHTML()
- %DrawJSStrings()
- %EnclosingDivId()
- %Eval()
- %EvalC()
- %Extends()
- %ForceClientRender()
- %GetDataByName()
- %GetEventHandlers()
- %GetParameter()
- %GetTypeByName()
- %GetXMLName()
- %IsA()
- %IsModified()
- %MakeId()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnAddToPageAfter()
- %OnAddToPageBefore()
- %OnDrawEnclosingDiv()
- %OnDrawObjectProperties()
- %OnObjectSynch()
- %OnZENDeserialize()
- %OriginalNamespace()
- %PackageName()
- %QuoteValue()
- %QuoteValueL10N()
- %RemoveFromSaveSet()
- %Self()
- %SerializeObject()
- %SetDataByName()
- %SetModified()
- %ValidateObject()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
- dragFinishHandler()
- dragHandler()
- dragNotifyHandler()
- dragStartHandler()
- dropHandler()
- dropStartHandler()
- exposeComponent()
- findElement()
- fireOnUpdateEvent()
- getData()
- getDataAsArrays()
- getDataAsObject()
- getDataByName()
- getDimSize()
- getDimensions()
- getEnclosingDiv()
- getError()
- getHidden()
- getHintElement()
- getLabel()
- getLabelElement()
- getModelId()
- getProperty()
- getPropertyName()
- getSettings()
- getType()
- getTypeByName()
- hasData()
- invokeAction()
- invokeSuper()
- isModelReadOnly()
- isOfType()
- isPropertyValid()
- makeId()
- onCreate()
- onDelete()
- onDisplayHandler()
- onEndModalHandler()
- onPopupAction()
- onRefreshContents()
- onSerialize()
- onStartModalHandler()
- onloadHandler()
- onunloadHandler()
- onupdateHandler()
- raiseDataChange()
- refreshContents()
- render()
- renderContents()
- renderSVG()
- sendEventToViews()
- setData()
- setDataByName()
- setHidden()
- setModelId()
- setOverlayMode()
- startProgressBar()
- stopProgressBar()
- update()