new Form(form)
Creates instance.
Parameters:
Name | Type | Description |
---|---|---|
form |
jQuery | DOMElement | string | The FORM element, any form input, or jQuery selector. |
Members
$form :jQuery
The form element.
Type:
initialized :boolean
The runtime flag whether form was initialized.
Type:
- boolean
submittable :boolean
The flag whether form is submittable inplace.
Type:
- boolean
(nullable) window :nge.ui.Window
The XTL window this form belongs to.
Type:
Methods
(static) fileCancel(button)
Invoked when file cancel button is clicked.
Parameters:
Name | Type | Description |
---|---|---|
button |
DOMElement | The DOM element clicked. |
(static) fileChange(button)
Invoked when file change button is clicked.
Parameters:
Name | Type | Description |
---|---|---|
button |
DOMElement | The DOM element clicked. |
(static) init(form)
Initializes XTL runtime handlers.
Parameters:
Name | Type | Description |
---|---|---|
form |
string | The jQuery selector. |
(static) of(form) → {nge.xtl.Form}
Returns nge.xtl.Form instance.
If it doesn't exist, it will be created.
Parameters:
Name | Type | Description |
---|---|---|
form |
jQuery | DOMElement | string | The FORM element, any form input, or jQuery selector. |
Returns:
The form instance.
- Type
- nge.xtl.Form
(static) toScope(obj) → {Object}
Transforms plain object into variable scope.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object | The object with data. |
Returns:
The variable scope.
- Type
- Object
addElement(event)
Invoked when 'Add element' is clicked.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The jQuery event. |
addItem(event)
Invoked when add item button is clicked in XTL listbox element.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The jQuery event. |
initComponents($$elem)
Initializes components.
Must be invoked when document is ready.
Parameters:
Name | Type | Description |
---|---|---|
$$elem |
jQuery | The element whose components to intialize. |
itemsOf(name) → {Array.<nge.xtl.Item>}
Returns an array of XTL items of specified XTL select input.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The input name. |
Returns:
An array of XTL items.
- Type
- Array.<nge.xtl.Item>
onWindowedClickSubmit(elem, event)
Invoked asynchronously when submit button is clicked in windowed form.
Parameters:
Name | Type | Description |
---|---|---|
elem |
DOMElement | The button. |
event |
jQuery.Event | The event. |
removeElement(event)
Invoked when 'Remove' is clicked.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The jQuery event. |
removeItem(event)
Invoked when remove item button is clicked in XTL listbox element.
Parameters:
Name | Type | Description |
---|---|---|
event |
jQuery.Event | The jQuery event. |
scope() → {Object}
Serializes form into variable scope.
Returns:
The variable scope.
- Type
- Object
serialize() → {nge.xtl.FormData}
Serializes form into form data object.
Returns:
The form data.
- Type
- nge.xtl.FormData
update(data)
Updates form values.
Parameters:
Name | Type | Description |
---|---|---|
data |
nge.xtl.FormData | The form data to set. |
windowed(win, request)
Enables XTL windowed mode behaviour.
Parameters:
Name | Type | Description |
---|---|---|
win |
nge.ui.Window | The window. |
request |
Object | The original RMI request. |