ButtonComponent

Description

Generates a button to execute a custom command and/or trigger a server action

Methods

enable()
Enables the button.
disable()
Disables the button.
setLabel(text)
Modifies the text label of the button.

Options

name
The name of the component
type
button
listeners
Array - Parameters who this component will react to
htmlObject
Id of the component (usually a div or a span tag) to be replaced by the result
refreshPeriod
Time in seconds for this component to refresh. Default is 0 (disabled)
label
Text to be used on the generated button (only used if htmlObject points to a div/span)
buttonStyle
The style of the button to render. Possible values: classic and themeroller. Default: themeroller
expression
Javascript code to be executed when the button is clicked. It the expression evaluates to false, the Action Datasource is not called.
executeAtStart
True to execute the component at start, false otherwise
preExecution
Function - Function to be called before the component is executed
postExecution
Function - Function to be called after the component is executed
preChange
Function(value) - Function to be called before the component is changed
postChange
Function(value) - Function to be called after the component is changed
actionDefinition
Datasource to be called when the button is clicked. If the server call is successful, successCallback is called, otherwise failureCallback is called. Optional.
successCallback
Function(resultset) Function to be called when the call to the datasource defined in actionDefinition is successful. Optional.
failureCallback
Function - Function to be called when the call to the datasource defined in actionDefinition fails. Optional.
tooltip
Tooltip to be displayed when mouse hovers

Sample