List
List widget is a container widget which can hold a list of selectable items.
The simple way to add List widget to your application is as follows
File /widgets/list/Snippet.tpl
items : data.items,
minWidth:100
The whole list of configuration parameters is available in ListCfg bean.
Styling
List widget is highly configurable for instance you can change flowOrientation, decide whether to display code, value or both etc.
File /widgets/list/Snippet.tpl
items : data.items,
minWidth:100,
displayOptions :{
flowOrientation : "horizontal",
listDisplay : "label",
tableMode : false
},
defaultTemplate : "ariadoc.samples.widgets.list.CustomTemplate"
Action
List widget is an action widget meaning, a callback function can be called based on the user action on the List widget
File /widgets/list/Snippet.tpl
items : data.items,
minWidth:100,
onchange: listOnChange
Binding
The following properties are bindable for List widget
- disabled
- selected
- items
- maxOptions
- multipleSelect
- selectedIndex
- selectedValues
- tooltip
For more information please read the article on Widget Bindings.
File /widgets/list/Snippet.tpl
items : data.items,
minWidth:100,
block: true,
bind: {
multipleSelect: {inside: data, to: 'multipleSelect1'},
selectedValues: {inside:data, to:"selectedValue1"}
}
