# inputEx-library

### inputEx 0.5.1

inputEx-library > inputEx > inputEx.RadioField
Search:
Filters Show Private Show Protected Show Deprecated

## 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:

`options`

### Methods

#### appendChoiceNode

`void appendChoiceNode ( node , position )`
Attach an node to the

Parameters:
  `node <HTMLElement>` The node to attach to the
  `position <Int>` The position of the choice in choicesList (may not be the "real" position in DOM)

#### 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 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) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

#### Methods inherited from inputEx.Field:

`clear, close, destroy, disable, displayMessage, enable, fireUpdatedEvt, focus, getEl, getParentField, getState, getStateString, getValue, hide, initEvents, isDisabled, isEmpty, onBlur, onChange, onFocus, render, renderComponent, setClassFromState, setFieldName, setOptions, setParentField, setValue, show, validate`

#### Events inherited from inputEx.Field:

`updatedEvt,`

Copyright © 2010 Eric Abouaf All rights reserved.