Class Index | File Index

Classes


Class dijit.form.FormWidget


Extends dijit.CssStateMixin, dijit.Templated, dijit.Widget.

Defined in: _FormWidget.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Base class for widgets corresponding to native HTML elements such as <checkbox> or <button>, which can be children of a <form> node or a `dijit.form.Form` widget.
Field Summary
Field Attributes Field Name and Description
<private>  
Indicates that changes to the value should call onChange() callback.
 
alt
Corresponds to the native HTML 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
 
On focus, should this widget scroll into view?
 
Order fields are traversed when user hits the tab key
 
Corresponds to the native HTML element's attribute.
 
Corresponds to the native HTML element's attribute.
Fields borrowed from class dijit.Widget:
_blankGif, _deferredConnects, _started, attributeMap, baseClass, containerNode, dir, domNode, id, lang, nodesWithKeyClick, srcNodeRef, style, title, tooltip
Fields borrowed from class dijit.Templated:
_attachPoints, _earlyTemplatedStartup, _skipNodeCache, templatePath, templateString, widgetsInTemplate
Fields borrowed from class dijit.CssStateMixin:
cssStateNodes
Method Summary
Method Attributes Method Name and Description
<private>  
_handleOnChange(newValue, priorityChange)
Called when the value of the widget is set.
 
compare(val1, val2)
Compare 2 values (as returned by get('value') for this widget).
 
Put focus on this widget
 
 
Tells if this widget is focusable or not.
 
onChange(newValue)
Callback when this widget's value is changed.
 
setDisabled(disabled)
 
setValue(value)
Methods borrowed from class dijit.Widget:
_applyAttributes, _attrToDom, _getAttrNames, _onBlur, _onConnect, _onFocus, _onShow, _setClassAttr, _setStyleAttr, attr, buildRendering, connect, create, destroy, destroyDescendants, destroyRecursive, destroyRendering, disconnect, get, getChildren, getDescendants, isLeftToRight, onBlur, onClick, onClose, onDblClick, onFocus, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow, placeAt, postCreate, postMixInProperties, postscript, set, setAttribute, startup, subscribe, toString, uninitialize, unsubscribe
Methods borrowed from class dijit.Templated:
_attachTemplateNodes, _fillContent, _stringRepl
Methods borrowed from class dijit.CssStateMixin:
_cssMouseEvent, _setStateClass, _trackMouseState
Class Detail
dijit.form.FormWidget()
Base class for widgets corresponding to native HTML elements such as <checkbox> or <button>, which can be children of a <form> node or a `dijit.form.Form` widget. Represents a single HTML element. All these widgets should have these attributes just like native HTML input elements. You can set them during widget construction or afterwards, via `dijit._Widget.attr`. They also share some common methods.
Field Detail
<private> _onChangeActive
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.

{String} alt
Corresponds to the native HTML element's attribute.

{Boolean} disabled
Should this widget respond to user input? In markup, this is specified as "disabled='disabled'", or just "disabled".

{Boolean} intermediateChanges
Fires onChange for each value change or only on demand

{String} name
Name used when submitting form; same as "name" attribute or plain HTML elements

{Boolean} scrollOnFocus
On focus, should this widget scroll into view?

{String} tabIndex
Order fields are traversed when user hits the tab key

{String} type
Corresponds to the native HTML element's attribute.

{String} value
Corresponds to the native HTML element's attribute.
Method Detail
<private> _handleOnChange(newValue, priorityChange)
Called when the value of the widget is set. Calls onChange() if appropriate.
Parameters:
{anything} newValue
the new value
{Boolean} priorityChange Optional
For a slider, for example, dragging the slider is priorityChange==false, but on mouse up, it's priorityChange==true. If intermediateChanges==true, onChange is only called form priorityChange=true events.

compare(val1, val2)
Compare 2 values (as returned by get('value') for this widget).
Parameters:
{anything} val1
{anything} val2

focus()
Put focus on this widget

getValue()
Deprecated:
Use get('value') instead.

{Boolean} isFocusable()
Tells if this widget is focusable or not. Used internally by dijit.
Returns:
{Boolean}

onChange(newValue)
Callback when this widget's value is changed.
Parameters:
{Object} newValue

setDisabled(disabled)
Parameters:
disabled
Deprecated:
Use set('disabled', ...) instead.

setValue(value)
Parameters:
value
Deprecated:
Use set('value', ...) instead.

Documentation generated by JsDoc Toolkit 2.3.2 on Mon Sep 20 2010 21:52:25 GMT+0900 (JST)