inputEx Documentation Back to homepage

### inputEx Documentation > inputEx.RadioField 0.2.2

## Static Class inputEx.RadioField - extends inputEx.Field

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

Known Subclasses:
  inputEx.RadioButton

### Constructor

inputEx.RadioField `( options )`

Parameters:
  `options <Object>` - inputEx.Field options object

### Properties

#### static groupOptions `- Object`

group Options for each field

#### options `- Object`

Configuration object to set the options for this class and the parent classes. See constructor details for options added by this class.

### Methods

#### getValue

`<Any> getValue()`
Get the field value
Returns:

`<Any>`

#### initEvents

`initEvents()`
Listen for change events on all radios

#### onChange

`onChange(e)`
Function called when the checkbox is toggled
Parameters:

`e <Event>` - The original 'change' event

#### renderComponent

`renderComponent()`
Render the checkbox and the hidden field

#### setOptions

`setOptions(options)`
Adds the Radio button specific options
Parameters:

`options <Object>` - Options object (inputEx inputParams) as passed to the constructor

#### setValue

`setValue(value[,sendUpdatedEvt])`
Set the value of the checkedbox
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 - (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

#### validate

`validate()`

#### Methods inherited from class inputEx.Field:

`focus, getEl, fireUpdatedEvt, show, close, onBlur, onFocus, getStateString, setClassFromState, disable, render, updatedEvt, getState, hide, displayMessage, destroy, isEmpty, enable, clear,`

Copyright (c) 2007-2009 Eric Abouaf. All rights reserved.
Generated by JsDoc Toolkit 2.0.0 on Wed, 04 Mar 2009 15:41:31 GMT using neyricjslibs-template.