Composite list of items.
A separate active visual block containing ``ListItem`` or ``ColsItem`` widgets and other.
Table of contents
UX1 only
The aps/List
container allows a user to drag and drop the child objects in the list. The child objects must be
instantiated from the aps/ListItem
module. The latter may also have its own child widgets.
This is a simple example illustrating a hierarchy of widgets using the aps/List
and aps/ListItem
modules.
require([
"aps/load",
"aps/ready!"
], function (load) {
load(["aps/Panel", [
["aps/List", {
isDnD: true,
selectionMode: ""
}, [
["aps/ListItem", {
id: "item_1",
label: "1st Item.",
description: "Cloud service - initially in the first position.",
buttons: [ {
label: "Subscribe",
onClick: function() {}
}, {
label: "Delete",
onClick: function() {}
}]
}],
["aps/ListItem", {
id: "item_2",
label: "2nd Item.",
description: "Cloud service - initially in the second position.",
buttons: [ {
label: "Subscribe",
onClick: function() {}
}, {
label: "Delete",
onClick: function() {}
}]
}],
["aps/ListItem", {
id: "item_3",
label: "3rd Item.",
description: "Cloud service - initially in the third position.",
buttons: [ {
label: "Subscribe",
onClick: function() {}
}, {
label: "Delete",
onClick: function() {}
}]
}]
]]
]]);
});
PROPERTY |
TYPE |
DEFAULT |
DESCRIPTION |
---|---|---|---|
boolean |
false |
Specifies if the widget will respond to user input. |
|
boolean |
false |
If it is true the widget’s id will be extended. |
|
string |
undefined |
This specifies the widget width that is relevant only for widgets inside Container, FieldSet, or Tiles. |
|
boolean |
false |
If the widget is busy then this property is true. |
|
boolean |
false |
Enables/disables drag’n’drop sorting functionality. |
|
string |
“” |
Text that is shown as a label if the widget is placed inside a aps/FieldSet. |
|
aps/store |
null |
An instance of the “aps/Store” model, from which to fetch data. |
|
boolean |
true |
If this property value is set to true, then the widget is visible. |
If it is true the widget’s id will be extended. It can be useful when some widgets (e.g. aps/Tiles) use the same store with defined id-s. Default value: false.
This specifies the widget width that is relevant only for widgets inside Container, FieldSet, or Tiles. In other cases it will be ignored.
gridSize string contains few options with number values (from 1 to 12) separated by spaces, which specify the grid size of the widget in different layouts:
- md - desktop
- xs - phone
For example, gridSize: “md-4 xs-2”.
All values below 1, e.g. “md-0”, will be replaced with the empty string (“”), values above 12, e.g. “md-14”, will be reduced to 12 (“md-12”).
Default value: undefined.
Enables/disables drag’n’drop sorting functionality. Default value: false.
Text that is shown as a label if the widget is placed inside a aps/FieldSet.
Default value: “”.
An instance of the “aps/Store” model, from which to fetch data. Default value: null.
If this property value is set to true, then the widget is visible.
Default value: true.
METHOD |
RETURN |
DESCRIPTION |
---|---|---|
object
|
Sets the isBusy property to false |
|
undefined
|
Destroys this widget |
|
aps/_containerbase
function
|
Focusing the focusable child |
|
any
|
Get a property of the Stateful instance |
|
array
|
Returns all direct children of this widget, i |
|
array
|
Discover and return all parents of the widget |
|
dijit/_widgetbase
function
|
Place this widget somewhere in the DOM based on standard dojo/dom-construct::place() conventions |
|
undefined
|
Refreshes a page |
|
undefined
|
Remove all children in the widget |
|
undefined
|
Resets the widget |
|
object
function
|
Set a property of the Stateful instance |
|
boolean
|
Called by oninit, onblur, and onkeypress |
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
undefined
|
|
|
undefined
|
Destroys this widget. Will also destroy any resources (including widgets) registered via this.own(). This method will also destroy internal widgets such as those created from a template.
Return: undefined
Get a property of the Stateful instance. Get a named property of the Stateful object. The property may potentially be retrieved via a getter method in subclasses.
In the base class, this just retrieves the object’s property.
Return: any
Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent is this widget. Note that it returns not all descendetns, but only the direct children. Analogous to Node.childNodes, except containing widgets rather than DOMNodes.
The result intentionally excludes internally created widgets (a.k.a. supporting widgets) outside of this.containerNode.
Note the returned array is a simple array. The application code should not assume existence of methods like forEach().
Return: array
Place this widget somewhere in the DOM based on standard dojo/dom-construct::place() conventions. A convenience function providing a simple shorthand mechanism to put an existing (or newly created) widget somewhere in the DOM, and allow chaining.
Return: dijit/_widgetbase function
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
undefined
|
Set a property of the Stateful instance. Sets named properties of the stateful object and notifies the watchers of the property. A programmatic setter may be defined in subclasses.
Return: object function
Called by oninit, onblur, and onkeypress. Show missing or invalid messages if appropriate, and highlight textbox field.
Return: boolean
EVENT |
RETURN |
DESCRIPTION |
---|---|---|
undefined
|
The method is called when a user clicks on the widget |
|
undefined
|
The function is overridden by aps/Grid when aps/List is used as columns selector |
The method is called when a user clicks on the widget.
The function is overridden by aps/Grid when aps/List is used as columns selector.