# Class: Button

## jala.Form.Component.Button(name)

Subclass of jala.Form.Component.Input which renders a button.

## Constructor

#### new Button(name)

Creates a new Button component instance

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | Name of the component, used as name of the html controls.

Source:
  - jala/code/Form.js, line 2327

##### Returns:

A newly created Button component

### Members

#### (inner) value :String

Private field containing the value of the button (ie. the visible text)

##### Type:

- String

Source:
  - jala/code/Form.js, line 2334

### Methods

#### getValue()

Returns the value set for this button.

Source:
  - jala/code/Form.js, line 2341

##### Returns:

value

#### render(attr, value, reqData)

Renders a button to the response.

##### Parameters:

Name | Type | Description
--- | --- | ---
`attr` | Object | Basic attributes for this element.
`value` | Object | Value to be used for rendering this element.
`reqData` | Object | Request data for the whole form. This argument is passed only if the form is re-rendered after an error occured.

Source:
  - jala/code/Form.js, line 2366

#### renderControls()

Creates a new attribute object for this button.

Source:
  - jala/code/Form.js, line 2388

##### Returns:

Object with all attributes set for this button.

#### setValue(newValue)

Sets the value for this button.

##### Parameters:

Name | Type | Description
--- | --- | ---
`newValue` | String | new value

Source:
  - jala/code/Form.js, line 2349