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.Checkbox

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

class jala.Form.Component.Checkbox
extends jala.Form.Component.Input

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

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

Method Summary
`String` | `checkRequirements(<Object> reqData)` Validates user input from checkbox.
`Number` | `parseValue(<Object> reqData)` Parses the string input from the form.
`void` | `renderControls(<Object> attr, <Object> value, reqData)` Renders an checkbox 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`

Constructor Detail

### jala.Form.Component.Checkbox

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

Creates a new Checkbox component instance

Parameters:

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

Returns:

A newly created Checkbox component instance

Method Detail

### checkRequirements

    String checkRequirements(<Object> reqData)

Validates user input from checkbox.

Parameters:

`reqData` - request data

Returns:

null if everything is ok or string containing error message

### parseValue

    Number parseValue(<Object> reqData)

Parses the string input from the form. For a checked box, the value is 1, for an unchecked box the value is 0.

Parameters:

`reqData` - request data

Returns:

parsed value

### renderControls

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

Renders an checkbox to the response.

Parameters:

`attr` - Basic attributes for this element.

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

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