inputEx Documentation Back to homepage

inputEx Documentation > inputEx.Group 0.2.2

Static Class inputEx.Group - extends inputEx.Field

Handle a group of fields
Known Subclasses:
inputEx.Form

Constructor

inputEx.Group ( options )
Parameters:
options <Object>  - The following options are added for Groups and subclasses:
  • fields: Array of input fields declared like { label: 'Enter the value:' , type: 'text' or fieldClass: inputEx.Field, optional: true/false, inputParams: {inputparams object} }
  • legend: The legend for the fieldset (default is an empty string)
  • collapsible: Boolean to make the group collapsible (default is false)
  • collapsed: If collapsible only, will be collapsed at creation (default is false)
  • flatten:

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

clear

clear([sendUpdatedEvt])
Clear all subfields
Parameters:
    sendUpdatedEvt <boolean> optional - (optional) Wether this clear should fire the updatedEvt or not (default is true, pass false to NOT send the event)

close

close()
Close the group (recursively calls "close" on each field, does NOT hide the group ) Call this function before hidding the group to close any field popup

disable

disable()
Disable all fields in the group

enable

enable()
Enable all fields in the group

focus

focus()
Set the focus to the first input in the group

getFieldByName

getFieldByName(fieldName)
Return the sub-field instance by its name property
Parameters:
    fieldName <String>  - The name property

getValue

getValue()
Return an object with all the values of the fields

initEvents

initEvents()
Add a listener for the 'collapsible' option

onChange

onChange(eventName,args)
Called when one of the group subfields is updated.
Parameters:
    eventName <String>  - Event name
    args <Array>  - Array of [fieldValue, fieldInstance]

render

render()
Render the group

renderField

renderField(fieldOptions)
Instanciate one field given its parameters, type or fieldClass
Parameters:
    fieldOptions <Object>  - The field properties as required bu inputEx.buildField

renderFields

renderFields(parentEl)
Render all the fields. We use the parentEl so that inputEx.Form can append them to the FORM tag
Parameters:
    parentEl

runAction

runAction(action,triggerValue)
Run an action (for interactions)
Parameters:
    action <Object>  - inputEx action object
    triggerValue <Any>  - The value that triggered the interaction

runInteractions

runInteractions(fieldInstance,fieldValue)
Run the interactions for the given field instance
Parameters:
    fieldInstance <inputEx.Field>  - Field that just changed
    fieldValue <Any>  - Field value

setOptions

setOptions(options)
Adds some options: legend, collapsible, fields...
Parameters:
    options <Object>  - Options object (inputEx inputParams) as passed to the constructor

setValue

setValue(value[,sendUpdatedEvt])
Set the values of each field from a key/value hash object
Parameters:
    value <Any>  - The group value
    sendUpdatedEvt <boolean> optional - (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

toggleCollapse

toggleCollapse()
Toggle the collapse state

validate

<Boolean> validate()
Validate each field
Returns:
    <Boolean> true if all fields validate and required fields are not empty




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.