Mixin to orchestrate dynamic forms.
This mixin provides a foundation for an enhanced form functionality: unified access to individual form elements, unified "onchange" event processing, general event processing, I/O orchestration, and common form-related functionality. See additional mixins in dojox.form.manager namespace.
See the dojox/form/manager/_Mixin reference documentation for more information.
Set or get a node context by name (using dojoAttachPoint).
Parameter | Type | Description |
---|---|---|
elem | String | Object | Array | A node. |
value | Object |
Optional Optional. The value to set. |
For a getter it returns the value, for a setter it returns self. If the elem is not valid, null will be returned.
Set or get a form widget by name.
Parameter | Type | Description |
---|---|---|
elem | String | Object | Array | Form element's name, widget object, or array or radio widgets. |
value | Object |
Optional Optional. The value to set. |
For a getter it returns the value, for a setter it returns self. If the elem is not valid, null will be returned.
Run an inspector function on controlled elements returning a result object.
Parameter | Type | Description |
---|---|---|
inspector | Function | A function to be called on a widget, form element, and an attached node. Takes three arguments: a name, a node (domNode in the case of widget) or an array of such objects, and a supplied value. Runs in the context of the form manager. Returns a value that will be collected and returned as a state. |
state | Object |
Optional Optional. If a name-value dictionary --- only listed names will be processed. If an array, all names in the array will be processed with defaultValue. If omitted or null, all controlled elements will be processed with defaultValue. |
defaultValue | Object |
Optional Optional. The default state (true, if omitted). |
Run an inspector function on "dojoAttachPoint" nodes returning a result object.
Parameter | Type | Description |
---|---|---|
inspector | Function | A function to be called on a node. Takes three arguments: a name, a node or an array of nodes, and a supplied value. Runs in the context of the form manager. Returns a value that will be collected and returned as a state. |
state | Object |
Optional Optional. If a name-value dictionary --- only listed names will be processed. If an array, all names in the array will be processed with defaultValue. If omitted or null, all attached point nodes will be processed with defaultValue. |
defaultValue | Object |
Optional Optional. The default state (true, if omitted). |
Run an inspector function on controlled widgets returning a result object.
Parameter | Type | Description |
---|---|---|
inspector | Function | A function to be called on a widget. Takes three arguments: a name, a widget object or an array of widget objects, and a supplied value. Runs in the context of the form manager. Returns a value that will be collected and returned as a state. |
state | Object |
Optional Optional. If a name-value dictionary --- only listed names will be processed. If an array, all names in the array will be processed with defaultValue. If omitted or null, all widgets will be processed with defaultValue. |
defaultValue | Object |
Optional Optional. The default state (true, if omitted). |
Register a widget with the form manager
Parameter | Type | Description |
---|---|---|
widget | String | Node | dijit/form/_FormWidget | A widget, or its widgetId, or its DOM node |
Returns self
Register widget's descendants with the form manager
Parameter | Type | Description |
---|---|---|
widget | String | Node | dijit._Widget | A widget, or its widgetId, or its DOM node |
Returns self
Called after all the widgets have been instantiated and their dom nodes have been inserted somewhere under win.doc.body.
Removes the widget by name from internal tables unregistering connected observers
Parameter | Type | Description |
---|---|---|
name | String | Name of the to unregister |
Returns self
Unregister widget's descendants with the form manager
Parameter | Type | Description |
---|---|---|
widget | String | Node | dijit/_Widget | A widget, or its widgetId, or its DOM node |
Returns self