%ZEN.Component.dynaForm
deprecated class %ZEN.Component.dynaForm extends %ZEN.Component.form
A dynaForm (dynamic form) is a specialized type of form that displays form whose controls are drawn automatically based on the contents of dataController associated with the form.For example:
<dataController id="data" modelClass="ZENMVC.Person"/> <dynaForm controllerId="data" injectControls="before"> <button caption="Save"/> </dynaForm>
It is also possible to use dynaForm without a dataController. In this case you must provide an OnGetPropertyInfo server-side callback method to specify the list of controls to display.
Property Inventory
Method Inventory
Properties
property OnGetPropertyInfo as %ZEN.Datatype.delegator (FORMALSPEC = "pIndex:%Integer,&pInfo:%String,pModelId:%String", RETURNTYPE = "%Status");
(Optional) Name of Server-side callback method called just before
dynamic components are injected into this form.
This callback method behaves in much the same way as the %OnGetPropertyInfo() method of the %ZEN.DataModel.ObjectDataModel class. This must be the name of a server-only method in the page class that contains this form component.
For example:
This callback method behaves in much the same way as the %OnGetPropertyInfo() method of the %ZEN.DataModel.ObjectDataModel class. This must be the name of a server-only method in the page class that contains this form component.
For example:
Method GetInfo(pIndex As %Integer,ByRef pInfo As %String,pModelId As %String) As %Status { // subscript of pInfo is the logical name of the control // the value of pInfo(name) is the sequence number (ordinal position of the control). // the value of pInfo(name,"%type") is the control type to display Set pInfo("Field1") = pIndex Set pInfo("Field1","%type") = "textarea" // the value of pInfo(name,"label") is the control label to display Set pInfo("Field2") = pIndex + 1 Set pInfo("Field2","label") = "Field 2" Quit $$$OK }
Property methods: OnGetPropertyInfoDisplayToLogical(), OnGetPropertyInfoGet(), OnGetPropertyInfoIsValid(), OnGetPropertyInfoLogicalToDisplay(), OnGetPropertyInfoLogicalToOdbc(), OnGetPropertyInfoNormalize(), OnGetPropertyInfoSet()
property defaultGroupId as %ZEN.Datatype.id;
If defined, this is the id of a group within this form in which
the dynamically created controls will be injected.
Property methods: defaultGroupIdDisplayToLogical(), defaultGroupIdGet(), defaultGroupIdIsValid(), defaultGroupIdLogicalToDisplay(), defaultGroupIdLogicalToOdbc(), defaultGroupIdNormalize(), defaultGroupIdSet()
property injectControls as %ZEN.Datatype.string (VALUELIST = ",before,after") [ InitialExpression = "after" ];
Specifies where in the form the automatically created controls are placed
relative to other controls that have been manually placed within the form:
If defaultGroupId is defined, then this is ignored.
- "after" - (default) inject the automatically placed controls after any manually placed controls.
- "before" - inject the automatically placed controls before any manually placed controls.
If defaultGroupId is defined, then this is ignored.
Property methods: injectControlsDisplayToLogical(), injectControlsGet(), injectControlsIsValid(), injectControlsLogicalToDisplay(), injectControlsLogicalToOdbc(), injectControlsNormalize(), injectControlsSet()
Methods
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
Inherited Members
Inherited Properties
- %condition
- %controller
- %import
- %includeFiles
- %page
- %resource
- OnLoadForm
- OnSubmitForm
- action
- align
- autoValidate
- autocomplete
- aux
- cellAlign
- cellSize
- cellStyle
- cellVAlign
- children
- composite
- containerStyle
- controller
- controllerId
- disabled
- dragEnabled
- dropEnabled
- enclosingClass
- enclosingStyle
- enctype
- error
- groupClass
- groupStyle
- height
- hidden
- hint
- hintClass
- hintStyle
- id
- index
- invalidMessage
- key
- label
- labelClass
- labelDisabledClass
- labelPosition
- labelStyle
- layout
- messageTargetId
- method
- name
- nextPage
- noModelMessage
- onafterdrag
- onbeforedrag
- onchange
- onclick
- ondefault
- ondrag
- ondrop
- onhide
- oninvalid
- onnotifyView
- onrefresh
- onreset
- onshow
- onsubmit
- onupdate
- onvalidate
- parent
- propagateChanges
- readOnlyMessage
- showLabel
- slice
- target
- title
- tuple
- valign
- visible
- width
- window
Inherited Methods
- %AddChild()
- %AddChildAfter()
- %AddChildBefore()
- %AddToSaveSet()
- %Attr()
- %BindExport()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %DrawComponentHTML()
- %DrawHTML()
- %DrawJSStrings()
- %EnclosingDivId()
- %Eval()
- %EvalC()
- %Extends()
- %ForceClientRender()
- %GetChildIndex()
- %GetEventHandlers()
- %GetParameter()
- %GetXMLName()
- %IsA()
- %IsModified()
- %MakeId()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnAddToPageAfter()
- %OnAddToPageBefore()
- %OnDrawEnclosingDiv()
- %OnDrawForm()
- %OnDrawObjectProperties()
- %OnMutateChildren()
- %OnObjectSynch()
- %OnZENDeserialize()
- %OriginalNamespace()
- %PackageName()
- %QuoteValue()
- %QuoteValueL10N()
- %RemoveChild()
- %RemoveChildren()
- %RemoveFromSaveSet()
- %Self()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- ReloadForm()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
- addChild()
- addChildAfter()
- addChildBefore()
- childrenMutated()
- clearModified()
- dragFinishHandler()
- dragHandler()
- dragNotifyHandler()
- dragStartHandler()
- dropHandler()
- dropStartHandler()
- exposeComponent()
- findElement()
- fireOnUpdateEvent()
- getChildIndex()
- getControlList()
- getController()
- getEnclosingDiv()
- getFormElement()
- getHidden()
- getHintElement()
- getLabelElement()
- getProperty()
- getSettings()
- getType()
- getValuesAsObject()
- invokeSuper()
- isModified()
- isOfType()
- makeId()
- onCreate()
- onDelete()
- onDisplayHandler()
- onEndModalHandler()
- onPopupAction()
- onSerialize()
- onStartModalHandler()
- ondisabledHandler()
- onloadHandler()
- onunloadHandler()
- onupdateHandler()
- refreshContents()
- reload()
- removeChild()
- render()
- renderContents()
- renderSVG()
- reset()
- save()
- sendEventToController()
- setControllerId()
- setHidden()
- setOverlayMode()
- setPropertyAll()
- setValuesByName()
- showMessage()
- startProgressBar()
- stopProgressBar()
- submit()
- submitHandler()
- validate()