DynamicPickListRows Class

Contains a list of picklist items in a Lightning component on a Lightning page.

Namespace

VisualEditor

DynamicPickListRows Constructors

The following are constructors for DynamicPickListRows.

DynamicPickListRows(rows, containsAllRows)

Creates an instance of the VisualEditor.DynamicPickListRows class using the specified parameters.

Signature

public DynamicPickListRows(List<VisualEditor.DataRow> rows, Boolean containsAllRows)

Parameters

rows
Type: List VisualEditor.DataRow
List of picklist items.
containsAllRows
Type: Boolean
Indicates if all values of the picklist are included in a type-ahead search query (true) or only those values initially displayed when the list is clicked on (false).
A picklist in a Lightning component can display only the first 200 values of a list. If containsAllRows is set to false, when a user does a type-ahead search to find values in the picklist, the search will only look at those first 200 values that were displayed, not the complete set of picklist values.

DynamicPickListRows(rows)

Creates an instance of the VisualEditor.DynamicPickListRows class using the specified parameter.

Signature

public DynamicPickListRows(List<VisualEditor.DataRow> rows)

Parameters

rows
Type: List VisualEditor.DataRow
List of picklist rows.

DynamicPickListRows()

Creates an instance of the VisualEditor.DynamicPickListRows class. You can then add rows by using the class’s addRow or addAllRows methods.

Signature

public DynamicPickListRows()

DynamicPickListRows Methods

The following are methods for DynamicPickListRows.

addAllRows(rows)

Adds a list of picklist items to a dynamic picklist rendered in a Lightning component on a Lightning page.

Signature

public void addAllRows(List<VisualEditor.DataRow> rows)

Parameters

rows
Type: List VisualEditor.DataRow
List of picklist items.

Return Value

Type: void

addRow(row)

Adds a single picklist item to a dynamic picklist rendered in a Lightning component on a Lightning page.

Signature

public void addRow(VisualEditor.DataRow row)

Parameters

row
Type: VisualEditor.DataRow
A single picklist item.

Return Value

Type: void

clone()

Makes a duplicate copy of the VisualEditor.DynamicPickListRows object.

Signature

public Object clone()

Return Value

Type: Object

containsAllRows()

Returns a Boolean value indicating whether all values of the picklist are included when a user does a type-ahead search query (true) or only those values initially displayed when the list is clicked on (false).

Signature

public Boolean containsAllRows()

Return Value

Type: Boolean

A picklist in a Lightning component can display only the first 200 values of a list. If containsAllRows is set to false, when a user does a type-ahead search to find values in the picklist, the search will only look at those first 200 values that were displayed, not the complete set of picklist values.

get(i)

Returns a picklist element stored at the specified index.

Signature

public VisualEditor.DataRow get(Integer i)

Parameters

i
Type: Integer
The index.

Return Value

Type: VisualEditor.DataRow

getDataRows()

Returns a list of picklist items.

Signature

public List<VisualEditor.DataRow> getDataRows()

Return Value

Type: List VisualEditor.DataRow

setContainsAllRows(containsAllRows)

Sets the value indicating whether all values of the picklist are included when a user does a type-ahead search query (true) or only those values initially displayed when the list is clicked on (false).

Signature

public void setContainsAllRows(Boolean containsAllRows)

Parameters

containsAllRows
Type: Boolean
Indicates if all values of the picklist are included in a type-ahead search query (true) or only those values initially displayed when the list is clicked on (false).
A picklist in a Lightning component can display only the first 200 values of a list. If containsAllRows is set to false, when a user does a type-ahead search to find values in the picklist, the search will only look at those first 200 values that were displayed, not the complete set of picklist values.

Return Value

Type: void

size()

Returns the size of the list of VisualEditor.DynamicPickListRows.

Signature

public Integer size()

Return Value

Type: Integer

sort()

Sorts the list of VisualEditor.DynamicPickListRows.

Signature

public void sort()

Return Value

Type: void