Caplin Trader 4.7.1

Class: OptionsNodeList

OptionsNodeList

The OptionsNodeList class is used to store the options available within br.presenter.node.SelectionField and br.presenter.node.MultiSelectionField instances.

Constructor

new OptionsNodeList(options)

Constructs a new OptionsNodeList instance.
Parameters:
Name Type Description
options Object The set of available options, either as an array (keys only) or a map (keys to label).

Extends

  • br.presenter.node.NodeList

Methods

getFirstOption() → {br.presenter.node.Option}

Retrieve the first option in the list — typically the default option.
Returns:
Type
br.presenter.node.Option

getOptionByLabel(label, ignoreCase)

Retrieve the option with the given label. (If there is more than one option which has the given label, the first instance is returned.)
Parameters:
Name Type Description
label String Label to search.
ignoreCase Boolean Controls whether the search should be case sensitive (default: false).
Returns:
br.presenter.node.Option

getOptionByValue(value, {@link)

Retrieve the option with the given unique value.
Parameters:
Name Type Description
value String Value to search.
{@link br.presenter.node.Option}

getOptionLabels() → {Array}

Retrieve an array of labels for each br.presenter.node.Option contained within this object.
Returns:
Type
Array

getOptions() → {Array}

Retrieve the array of br.presenter.node.Option instances contained by this object.
Returns:
Type
Array

getOptionValues() → {Array}

Retrieve an array of values for each br.presenter.node.Option contained within this object.
Returns:
Type
Array

setOptions(options)

Reset the list of available options using the given array or map.
Parameters:
Name Type Description
options Object The set of available options, either as an array (keys only) or a map (keys to label).