DataRow Class

Contains information about one item in a picklist used in a Lightning component on a Lightning page.

Namespace

VisualEditor

DataRow Constructors

The following are constructors for DataRow.

DataRow(label, value, selected)

Creates an instance of the VisualEditor.DataRow class using the specified label, value, and selected option.

Signature

public DataRow(String label, Object value, Boolean selected)

Parameters

label
Type: String
User-facing label for the picklist item.
value
Type: Object
The value of the picklist item.
selected
Type: Boolean
Specifies whether the picklist item is selected (true) or not (false).

DataRow(label, value)

Creates an instance of the VisualEditor.DataRow class using the specified label and value.

Signature

public DataRow(String label, Object value)

Parameters

label
Type: String
User-facing label for the picklist item.
value
Type: Object
The value of the picklist item.

DataRow Methods

The following are methods for DataRow.

clone()

Makes a duplicate copy of the VisualEditor.DataRow object.

Signature

public Object clone()

Return Value

Type: Object

compareTo(o)

Compares the current VisualEditor.DataRow object to the specified one. Returns an integer value that is the result of the comparison.

Signature

public Integer compareTo(VisualEditor.DataRow o)

Parameters

o
Type: VisualEditor.DataRow
A single item in a picklist.

Return Value

Type: Integer

Returns one of the following values:

  • Zero if the current package version is equal to the specified package version
  • An integer value greater than zero if the current package version is greater than the specified package version
  • An integer value less than zero if the current package version is less than the specified package version

getLabel()

Returns the user-facing label of the picklist item.

Signature

public String getLabel()

Return Value

Type: String

getValue()

Returns the value of the picklist item.

Signature

public Object getValue()

Return Value

Type: Object

isSelected()

Returns the state of the picklist item, indicating whether it’s selected or not.

Signature

public Boolean isSelected()

Return Value

Type: Boolean