dojox/form/_SelectStackMixin (version 1.10)

Summary

Mix this class in to a dijit.form._FormSelectWidget in order to provide support for "selectable" multiforms. The widget is pointed to a dijit.layout.StackContainer and will handle displaying and submitting the values of only the appropriate pane.

The options for this widget will be automatically set - based on the panes that are in the stack container. The "title" attribute of the pane will be used for the display of the option. The "id" attribute of the pane will be used as the value of the option. In order to avoid running into unique ID constraint issues, a stackPrefix mechanism is provided.

See the dojox/form/_SelectStackMixin reference documentation for more information.

Property Summary

  • stackIdThe id of the stack that this widget is supposed to control
  • stackPrefixA prefix to remove from our stack pane ids when setting our options.

Method Summary

Event Summary

  • onAddChild(pane,insertIndex) Called when the stack container adds a new pane
  • onRemoveChild(pane) Called when the stack container removes a pane
  • onSelectChild(pane) Called when the stack container selects a new pane
  • onStartup(info) Called when the stack container is started up

Properties

stackId

The id of the stack that this widget is supposed to control

stackPrefix

A prefix to remove from our stack pane ids when setting our options. This exists so that we won't run into unique ID constraints. For example, if stackPrefix is set to "foo_", and there are three panes in our stack with ids of "foo_a", "foo_b", and "foo_c", then the values of the options created for the stack controller widget will be "a", "b", and "c". This allows you to have multiple select stack widgets with the same values - without having to have the panes require the same ids.

Methods

_connectTitle(pane,value)
Parameter Type Description
pane dijit/_Widget
value String
_handleSelfOnChange(val)

Called when form select widget's value has changed

Parameter Type Description
val String
_optionValFromPane(id)

Gets the option value given a pane ID

Parameter Type Description
id String
Returns:undefined | String
_paneIdFromOption(oVal)

Gets the pane ID given an option value

Parameter Type Description
oVal String
Returns:string
_setValueAttr(v)
Parameter Type Description
v undefined
_togglePane(pane,shown)

called when a pane is either shown or hidden (so that we can toggle the widgets on it)

Parameter Type Description
pane dijit/_Widget
shown Boolean
attr(name,value)
Parameter Type Description
name String | Object
value Object
Optional
Returns:undefined
destroy()
postCreate()
postMixInProperties()

Events

onAddChild(pane,insertIndex)

Called when the stack container adds a new pane

Parameter Type Description
pane dijit/_Widget
insertIndex Integer
Optional
onRemoveChild(pane)

Called when the stack container removes a pane

Parameter Type Description
pane dijit/_Widget
onSelectChild(pane)

Called when the stack container selects a new pane

Parameter Type Description
pane dijit/_Widget
onStartup(info)

Called when the stack container is started up

Parameter Type Description
info Object
Error in the documentation? Can’t find what you are looking for? Let us know!