inputEx-library

inputEx  0.7.1

inputEx-library > inputEx > inputEx.RadioField
Search:
 
Filters

Class inputEx.RadioField - extends inputEx.Field

Known Subclasses:
inputEx.RadioButton
Create a radio button. Here are the added options :
  • choices: list of choices (array of string)
  • values: list of returned values (array )
  • allowAny: add an option with a string field

Constructor

inputEx.RadioField ( options )
Parameters:
options <Object> inputEx.Field options object

Properties inherited from inputEx.Field:

Methods

appendChoiceNode

void appendChoiceNode ( node , position )
Attach an

clear

void clear ( [sendUpdatedEvt] )
Clear the field by setting the field value to this.options.value
Parameters:
[sendUpdatedEvt] <boolean> (optional) Wether this clear should fire the updatedEvt or not (default is true, pass false to NOT send the event)

disable

void disable ( )
Disable the field

enable

void enable ( )
Enable the field

getValue

Any getValue ( )
Get the field value

initEvents

void initEvents ( )
Listen for change events on all radios

isEmpty

void isEmpty ( )
Should return true if empty

onChange

void onChange ( e )
Function called when the checkbox is toggled
Parameters:
e <Event> The original 'change' event

renderComponent

void renderComponent ( )
Render the checkbox and the hidden field

setOptions

void setOptions ( options )
Adds the Radio button specific options
Parameters:
options <Object> Options object as passed to the constructor

setSelectedClass

void setSelectedClass ( )
Add an additional class to the currently selected inputEx-RadioField-choice

setValue

void setValue ( value , [sendUpdatedEvt] )
Set the value of the Radio
Parameters:
value <Any> The value schould be one of this.options.values (which defaults to this.options.choices if missing) if allowAny option not true.
[sendUpdatedEvt] <boolean> (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

Events inherited from inputEx.Field:


Copyright © 2011 Eric Abouaf All rights reserved.