inputEx Documentation Back to homepage

### inputEx Documentation > inputEx.DSSelectField 0.2.2

## Static Class inputEx.DSSelectField - extends inputEx.SelectField

Create a select field from a datasource

### Constructor

inputEx.DSSelectField `( options )`

Parameters:
  `options <Object>` - Added options:
  - selectValues: contains the list of options values
  - selectOptions: list of option element texts
  - multiple: boolean to allow multiple selections
  - datasource: the datasource
  - valueKey: value key
  - labelKey: label key

### 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()`
Return the value
Returns:

`<Any>` the selected value from the selectValues array

#### onDatasourceFailure

`onDatasourceFailure(oRequest,oParsedResponse,oPayload)`
Callback for request failure
Parameters:

`oRequest`

`oParsedResponse`

`oPayload`

#### onDatasourceSuccess

`onDatasourceSuccess(oRequest,oParsedResponse,oPayload)`
Callback for request success
Parameters:

`oRequest`

`oParsedResponse`

`oPayload`

#### populateSelect

`populateSelect(items)`
Insert the options
Parameters:

`items`

#### renderComponent

`renderComponent()`
Build a select tag with options

#### sendDataRequest

`sendDataRequest(oRequest)`
Send the datasource request
Parameters:

`oRequest`

#### setOptions

`setOptions(options)`
Setup the additional options for selectfield
Parameters:

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

#### setValue

`setValue(value[,sendUpdatedEvt])`
Set the value
Parameters:

`value <String>` - The value to set

`sendUpdatedEvt <boolean>` optional - (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

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

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

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

`disable, addOption, enable, removeOption, initEvents,`

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