Mixin for widgets corresponding to native HTML elements such as <input>
or <select>
that have user changeable values.
Each _FormValueMixin represents a single input value, and has a (possibly hidden) <input>
element,
to which it serializes it's input value, so that form submission (either normal submission or via FormBind?)
works as expected.
See the dijit/form/_FormValueMixin reference documentation for more information.
Indicates that changes to the value should call onChange() callback. This is false during widget initialization, to avoid calling onChange() when the initial value is set.
Corresponds to the native HTML <input>
element's attribute.
Should this widget respond to user input? In markup, this is specified as "disabled='disabled'", or just "disabled".
Fires onChange for each value change or only on demand
Name used when submitting form; same as "name" attribute or plain HTML elements
Should this widget respond to user input? In markup, this is specified as "readOnly". Similar to disabled except readOnly form values are submitted.
On focus, should this widget scroll into view?
Order fields are traversed when user hits the tab key
Corresponds to the native HTML <input>
element's attribute.
Corresponds to the native HTML <input>
element's attribute.
Called when the value of the widget has changed. Saves the new value in this.value, and calls onChange() if appropriate. See _FormWidget._handleOnChange() for details.
Parameter | Type | Description |
---|---|---|
newValue | anything | |
priorityChange | Boolean |
Optional
|
Parameter | Type | Description |
---|---|---|
value | Boolean |
Parameter | Type | Description |
---|---|---|
value | Boolean |
Hook so set('value', value) works.
Sets the value of the widget. If the value has changed, then fire onChange event, unless priorityChange is specified as null (or false?)
Parameter | Type | Description |
---|---|---|
newValue | anything | |
priorityChange | Boolean |
Optional
|
Compare 2 values (as returned by get('value') for this widget).
Parameter | Type | Description |
---|---|---|
val1 | anything | |
val2 | anything |
Tells if this widget is focusable or not. Used internally by dijit.
Reset the widget's value to what it was at initialization time
Callback when this widget's value is changed.
Parameter | Type | Description |
---|---|---|
newValue | undefined |