interface Form
All Known Implementing Classes:
jsx3.gui.Button,
jsx3.gui.CheckBox,
jsx3.gui.ColorPicker,
jsx3.gui.DatePicker,
jsx3.gui.Grid,
jsx3.gui.ImageButton,
jsx3.gui.List,
jsx3.gui.Matrix,
jsx3.gui.Menu,
jsx3.gui.RadioButton,
jsx3.gui.Select,
jsx3.gui.Slider,
jsx3.gui.Table,
jsx3.gui.TextBox,
jsx3.gui.TimePicker,
jsx3.gui.ToolbarButton,
jsx3.gui.Tree
abstract interface Form
Mixin interface. Contains methods and constants encapsulating the functionality of an HTML form control.
| Field Summary |
|---|
| static String | #d8d8e5 (default)
|
| static String | #a8a8b5 (default)
|
| static int | Value for the required field indicating that the form field is optional. |
| static int | Value for the required field indicating that the form field is required. |
| static int | Value for the enabled field indicating that the form field is disabled. |
| static int | Value for the enabled field indicating that the form field is enabled. |
| static int | Value for the validation state field indicating that the value of the form field is invalid. |
| static int | Value for the validation state field indicating that the value of the form field is valid. |
| Method Summary |
|---|
| jsx3.gui.HotKey | Binds the given key sequence to a callback function. |
| jsx3.gui.Form | Resets the validation state of this control. |
| abstract int | Abstract method that must be implemented by any class that implements the Form interface. |
| String | Returns the background color of this control when it is disabled. |
| String | Returns the font color to use when this control is disabled. |
| int | Returns the state for the form field control. |
| String | Returns the key binding that when keyed will fire the execute event for this control. |
| int | Returns whether or not this control is required. |
| int | Returns the validation state of this control. |
| Number | String | Returns the value of this control. |
| static String | |
| static void | Traverses the DOM branch starting at objJSXContainer and calls doReset() on all nodes
of type jsx3.gui.Form. |
| jsx3.gui.Form | Sets the background color of this form control when it is disabled. |
| jsx3.gui.Form | Sets the font color to use when this control is disabled. |
| void | Sets whether this control is enabled. |
| jsx3.gui.Form | Sets the key binding that when keyed will fire the bound execute (jsx3.gui.Interactive.EXECUTE)
event for this control. |
| jsx3.gui.Form | Sets whether or not this control is required. |
| jsx3.gui.Form | Sets the validation state of this control. |
| jsx3.gui.Form | Sets the value of this control. |
| static int | Traverses the DOM branch starting at objJSXContainer and calls doValidate() on all nodes
of type jsx3.gui.Form. |
static
String DEFAULTDISABLEDBACKGROUNDCOLOR
static
String DEFAULTDISABLEDCOLOR
static final
int OPTIONAL
Value for the required field indicating that the form field is optional.
static final
int REQUIRED
Value for the required field indicating that the form field is required.
static final
int STATEDISABLED
Value for the enabled field indicating that the form field is disabled.
static final
int STATEENABLED
Value for the enabled field indicating that the form field is enabled.
static final
int STATEINVALID
Value for the validation state field indicating that the value of the form field is invalid.
static final
int STATEVALID
Value for the validation state field indicating that the value of the form field is valid.
Binds the given key sequence to a callback function. Any object that has a key binding (specified with
setKeyBinding()) will call this method when painted to register the key sequence with an appropriate
ancestor of this form control. Any key down event that bubbles up to the ancestor without being intercepted
and matches the given key sequence will invoke the given callback function.
As of 3.2: The hot key will be registered with the first ancestor found that is either a
jsx3.gui.Window,
a jsx3.gui.Dialog, or the root block of a
jsx3.app.Server.
Parameters:
fctCallback – JavaScript function to execute when the given sequence is keyed by the user.
strKeys – a plus-delimited ('+') key sequence such as ctrl+s or
ctrl+shift+alt+h or shift+a, etc. Any combination of shift, ctrl, and alt are
supported, including none. Also supported as the final token are enter, esc,
tab, del, and space. To specify the final token as a key code, the
last token can be the key code contained in brackets, [13].
Returns:
the registered hot key or null if strKeys is an invalid key
combination.
See Also:
Resets the validation state of this control.
Returns:
this object.
abstract
int doValidate()
Abstract method that must be implemented by any class that implements the Form interface.
Returns:
STATEINVALID or STATEVALID.
String getDisabledBackgroundColor()
Returns the background color of this control when it is disabled.
Returns:
valid CSS property value, (i.e., red, #ff0000)
Returns the font color to use when this control is disabled.
Returns:
valid CSS property value, (i.e., red, #ff0000)
Returns the state for the form field control. If no enabled state is set, this method returns
STATEENABLED.
Returns:
STATEDISABLED or STATEENABLED.
See Also:
Returns the key binding that when keyed will fire the execute event for this control.
Returns:
plus-delimited (e.g.,'+') key sequence such as ctrl+s or ctrl+shift+alt+h or shift+a, etc
See Also:
Returns whether or not this control is required. If the required property has never been set, this method returns
OPTIONAL.
Returns:
REQUIRED or OPTIONAL.
See Also:
Returns the validation state of this control. If the validationState property has never been set, this method returns
STATEVALID.
Returns:
STATEINVALID or STATEVALID.
See Also:
Returns the value of this control.
Returns:
Deprecated.
Returns the release/build for the class (i.e., "2.2.00")
Returns:
Traverses the DOM branch starting at objJSXContainer and calls doReset() on all nodes
of type jsx3.gui.Form.
Parameters:
objJSXContainer – JSX GUI object containing all form fields that need to be reset (the 'reset' process will start with this item and be applied to all descendants, not just direct children)
See Also:
Sets the background color of this form control when it is disabled.
Parameters:
strColor – valid CSS property value, (i.e., red, #ff0000)
Returns:
this object.
Sets the font color to use when this control is disabled.
Parameters:
strColor – valid CSS property value, (i.e., red, #ff0000)
Returns:
this object.
void setEnabled(intEnabled
: int, bRepaint
: boolean)
Sets whether this control is enabled. Disabled controls do not respond to user interaction.
Parameters:
intEnabled – STATEDISABLED or STATEENABLED. null is
equivalent to STATEENABLED.
bRepaint – if true this control is immediately repainted to reflect the new setting.
Sets the key binding that when keyed will fire the bound execute (jsx3.gui.Interactive.EXECUTE)
event for this control.
Parameters:
strSequence – plus-delimited (e.g.,'+') key sequence such as ctrl+s or ctrl+shift+alt+h or shift+a, etc
Returns:
this object.
See Also:
Sets whether or not this control is required.
Parameters:
required – {int} REQUIRED or OPTIONAL.
Returns:
this object.
Sets the validation state of this control. The validation state of a control is not serialized.
Parameters:
intState – STATEINVALID or STATEVALID.
Returns:
this object.
Sets the value of this control.
Parameters:
vntValue – string/int value for the component
Returns:
this object.
Traverses the DOM branch starting at objJSXContainer and calls doValidate() on all nodes
of type jsx3.gui.Form. A custom function handler, objHandler, can be passed that will
be called once for each encountered form control.
Parameters:
objJSXContainer – JSX GUI object containing all form fields that need to be validated (recursive validation will start with this item and be applied to all descendants, not just direct children)
objHandler – a JavaScript function (as object). This function will be passed two parameters: the object reference to the JSX Form object (textbox, selectbox, checkbox, etc) being validated as well as a constant denoting whether or not it validated (0 or 1)—1 meaning true
Returns:
STATEINVALID or STATEVALID.
Copyright © 2001-2008, TIBCO Software Inc.