DataRow Class

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

VisualEditor

The following are constructors for DataRow.

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

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

  • 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).

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

public DataRow(String label, Object value)

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

The following are methods for DataRow.

  • clone()

    Makes a duplicate copy of the VisualEditor.DataRow object.

  • compareTo(o)

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

  • getLabel()

    Returns the user-facing label of the picklist item.

  • getValue()

    Returns the value of the picklist item.

  • isSelected()

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

Makes a duplicate copy of the VisualEditor.DataRow object.

public Object clone()

Type: Object

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

public Integer compareTo(VisualEditor.DataRow o)

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

Returns the user-facing label of the picklist item.

public String getLabel()

Type: String

Returns the value of the picklist item.

public Object getValue()

Type: Object

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

public Boolean isSelected()

Type: Boolean