dojox/form/manager/_Mixin (version 1.10)

Summary

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.

Property Summary

Method Summary

  • destroy() Called when the widget is being destroyed
  • formPointValue(elem,value) Set or get a node context by name (using dojoAttachPoint).
  • formWidgetValue(elem,value) Set or get a form widget by name.
  • inspect(inspector,state,defaultValue) Run an inspector function on controlled elements returning a result object.
  • inspectAttachedPoints(inspector,state,defaultValue) Run an inspector function on "dojoAttachPoint" nodes returning a result object.
  • inspectFormWidgets(inspector,state,defaultValue) Run an inspector function on controlled widgets returning a result object.
  • registerWidget(widget) Register a widget with the form manager
  • registerWidgetDescendants(widget) Register widget's descendants with the form manager
  • startup() Called after all the widgets have been instantiated and their dom nodes have been inserted somewhere under win.doc.body.
  • unregisterWidget(name) Removes the widget by name from internal tables unregistering connected observers
  • unregisterWidgetDescendants(widget) Unregister widget's descendants with the form manager

Properties

watching

Methods

destroy()

Called when the widget is being destroyed

formPointValue(elem,value)

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.

Returns:Object | null | function

For a getter it returns the value, for a setter it returns self. If the elem is not valid, null will be returned.

formWidgetValue(elem,value)

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.

Returns:Object | null | function | undefined

For a getter it returns the value, for a setter it returns self. If the elem is not valid, null will be returned.

inspect(inspector,state,defaultValue)

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).

Returns:undefined
inspectAttachedPoints(inspector,state,defaultValue)

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).

Returns:object
inspectFormWidgets(inspector,state,defaultValue)

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).

Returns:object
registerWidget(widget)

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:Object | function

Returns self

registerWidgetDescendants(widget)

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:Object | function

Returns self

startup()

Called after all the widgets have been instantiated and their dom nodes have been inserted somewhere under win.doc.body.

unregisterWidget(name)

Removes the widget by name from internal tables unregistering connected observers

Parameter Type Description
name String

Name of the to unregister

Returns:Object | function

Returns self

unregisterWidgetDescendants(widget)

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:Object | function

Returns self

Error in the documentation? Can’t find what you are looking for? Let us know!