Class ox.UI.Container
Extends
ox.UI.Widget.
Abstract base class of all containers.
Defined in: configuration.js.
Constructor Attributes | Constructor Name and Description |
---|---|
- Fields borrowed from class ox.UI.Widget:
- default_value, enabled, formnode, initialized, isEnabled, isVisible, node, parent, visible, width
Method Attributes | Method Name and Description |
---|---|
addCells(label, input)
Adds a row consisting of two cells: a label and a form element.
|
|
addRow(child, table)
Adds a content row to the container.
|
|
addWidget(widget, name)
Adds a widget to this container as a new child.
|
|
deleteWidget(widget)
Removes a previously added widget.
|
|
get()
Returns an object with all child values.
|
|
set(data)
Sets the values of all children.
|
- Methods borrowed from class ox.UI.Widget:
- addContent, applyEnabled, applyVisible, disable, enable, hide, remove, resize, setEnabled, setParent, setVisible, show
Method Detail
{DOM node}
addCells(label, input)
Adds a row consisting of two cells: a label and a form element.
The form element will align itself with other form elements
- Parameters:
- {I18nString} label
- An optional label text for the form element.
- {DOM node} input
- The DOM node which contains the form element.
- Returns:
- The DOM TR element of the added row.
{DOM node}
addRow(child, table)
Adds a content row to the container.
- Parameters:
- {DOM Node} child
- A DOM node which is or contains the chlid widget.
- {Boolean} table
- Specifies whether the contents of this row should align themselves with the content of other rows (if true), or not (if false).
- Returns:
- The DOM TR or DIV element of the added row.
addWidget(widget, name)
Adds a widget to this container as a new child.
The new widget appears behind all previously added widgets.
The value of the container is an object which contains the values of
all children. Each child value appears in the value of the container
as a field with the name specified by the parameter name.
- Parameters:
- {Widget} widget
- The widget to add.
- {String or ox.UI.Controller} name
- If a string, the field name under which the child value will appear in the container's value. If an ox.UI.Controller, the controller which is responsible for building and parsing the container value. If not specified, the child value will not be connected to the container value.
deleteWidget(widget)
Removes a previously added widget.
- Parameters:
- {Widget} widget
- The widget to remove.
{Object}
get()
Returns an object with all child values.
Only children with specified field names are queried.
set(data)
Sets the values of all children.
- Parameters:
- {Object} data
- An object with a field for every child. If a child was added with a field name, but the object does not contain that field, the child will be set to its default value.