new List(options)
A list
options: { element : «Element | ID», name : «String», url : «String», source : «hui.ui.Source», selectable : «true | false», dropFiles : «true | false», indent : «Integer» } Events: $open(row) - When a row is double clicked (rename to open) $select(firstRow) - When a row is (un)selected/(un)checked $clickButton({row:row,button:button}) - When a button is clicked $clickIcon({row:row,data:data,node:node}) - When an icon is clicked Bindings:windowwindow.page sort.direction sort.key
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options : {url:null,source:null,selectable:«boolean»} |
Methods
-
<static> create(options)
-
Creates a new list widget
options: { maxHeight : «Integer», name : «String», url : «String», source : «hui.ui.Source», selectable : «true | false», dropFiles : «true | false», indent : «Integer» }
Parameters:
Name Type Description options
Object The options
-
clear()
-
Clears the data of the list and removes its data source
-
getFirstSelection()
-
Gets the first selection or null
Returns:
The first selected row
- Type
- Object
-
getRows()
-
Gets all rows of the list
Returns:
The all rows
- Type
- Array
-
getSelection()
-
Gets an array of selections
Returns:
The selected rows
- Type
- Array
-
hide()
-
Hides the list
-
resetState()
-
Resets the window state of the navigator
-
setParameter(key, value)
-
Add a parameter
Parameters:
Name Type Description key
String The key
value
String The value
-
setSource(source)
-
Sets the lists data source and refreshes it if it is new
Parameters:
Name Type Description source
hui.ui.Source The source
-
setUrl(url)
-
Set an url to load data from, and load the data
Parameters:
Name Type Description url
String The url
-
show()
-
Shows the list