Overview | File | Class | Tree | Index | Help
| Jala 1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class jala.Form.Component.Select

    Object
       |
       +--jala.Form.Component.Input
             |
             +--jala.Form.Component.Select

Direct Known Subclasses:
  jala.Form.Component.Radio

class jala.Form.Component.Select
extends jala.Form.Component.Input

Subclass of jala.Form.Component.Input which renders and validates a dropdown element.
Defined in Form.js

Constructor Summary
`jala.Form.Component.Select (<String> name)` Constructs a new Select component instance

Method Summary
`String` | `checkOptions(<Object> reqData)` Checks user input for optiongroups: Unless require("checkoptions") has ben set to false, the user input must exist in the option array.
`String` | `checkRequirements(<Object> reqData)` Validates user input from a dropdown element by making sure that the option value list contains the user input.
`Array` | `parseOptions()` Creates an array of options for a dropdown element or a group of radiobuttons.
`void` | `renderControls(<Object> attr, <Object> value, <Object> reqData)` Renders a dropdown element to the response.

Methods inherited from class jala.Form.Component.Input
`validate, save, getValue, setValue, render, renderError, renderLabel, renderHelp, render_macro, controls_macro, error_macro, label_macro, help_macro, id_macro, name_macro, type_macro, class_macro, getControlAttributes, checkLength, parseValue`

Constructor Detail

### jala.Form.Component.Select

    jala.Form.Component.Select(<String> name)

Constructs a new Select component instance

Parameters:

`name` - Name of the component, used as name of the html controls.

Returns:

A newly created Select component

Method Detail

### checkOptions

    String checkOptions(<Object> reqData)

Checks user input for optiongroups: Unless require("checkoptions") has ben set to false, the user input must exist in the option array.

Parameters:

`reqData` - request data

Returns:

null if everything is ok or string containing error message

### checkRequirements

    String checkRequirements(<Object> reqData)

Validates user input from a dropdown element by making sure that the option value list contains the user input.

Parameters:

`reqData` - request data

Returns:

string containing error message or null if everything is ok.

See:

- jala.Form.Component.Select.checkOptions()

### parseOptions

    Array parseOptions()

Creates an array of options for a dropdown element or a group of radiobuttons. If options field of this element's config is an array, that array is returned. If options is a function, its return value is returned.

Returns:

array of options

### renderControls

    void renderControls(<Object> attr, <Object> value, <Object> reqData)

Renders a dropdown element to the response.

Parameters:

`attr` - Basic attributes for this element.

`value` - Value to be used for rendering this element.

`reqData` - Request data for the whole form. This argument is passed only if the form is re-rendered after an error occured.

Overview | File | Class | Tree | Index | Help
| Jala 1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Tue May 29 10:26:15 2007