Class: Model

ko/ui/richlistbox~ Model


Model()

The model for the row UI element, this is what model:ko/ui/richlistbox.create returns

Properties:
Name Type Description
name string

The node name of the element

element Element

A XUL richlistbox

Extends

Methods


<static> addListItem(item)

Add an item to the container

Parameters:
Name Type Description
item mixed

item to be added to the container. Can be String (label), ko/ui/, ko/dom element, DOM element, option object. option object refers to an Options object used throughout this SDK. The options should contain an attributes property to assign a label at the very least: { label: "itemLabel" }

Object refers to an Options object used through this SDK. The options should contain an attributes property to assign a label at the very least:

{ attributes: { label:"itemLable" } }


<static> addListItems(items)

Add items to the listbox

Parameters:
Name Type Description
items array

Array of items to add, this calls addListItem() for each item


<static> getSelectedItem()

Get the selected item index in the lists

Returns:

the selected item

Type
element

<static> getSelectedItems()

Get list of selected items

Returns:

an array of selected items

Type
array

<static> moveSelectionDown()

Move selection down one


<static> moveSelectionUp()

Move selection up one


<static> removeAllItems()

Remove all items from the list