Class GridSelectRecordsTask

All Implemented Interfaces:
HasHandlers

public class GridSelectRecordsTask extends ComponentTask
Select or deselect one or more records as specified by criteria. Target records will also be scrolled into view or, for a tree, parent folders will be opened to reveal the node.

Task Output:

  • On a select, the set of newly selected records is the output, even if other records are also selected.
  • On a deselect, the entire set of de-selected records is the output.
  • Constructor Details

    • GridSelectRecordsTask

      public GridSelectRecordsTask()
    • GridSelectRecordsTask

      public GridSelectRecordsTask(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static GridSelectRecordsTask getOrCreateRef(JavaScriptObject jsObj)
    • create

      public JavaScriptObject create()
      Overrides:
      create in class ComponentTask
    • setCriteria

      public GridSelectRecordsTask setCriteria(Criteria criteria) throws IllegalStateException
      Criteria defining the records that should be selected or deselected. All records are selected or deselected if not specified.

      To target a single record just specify criteria for its primary key.

      Parameters:
      criteria - New criteria value. Default value is null
      Returns:
      GridSelectRecordsTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getCriteria

      public Criteria getCriteria()
      Criteria defining the records that should be selected or deselected. All records are selected or deselected if not specified.

      To target a single record just specify criteria for its primary key.

      Returns:
      Current criteria value. Default value is null
    • setKeepExistingSelection

      public GridSelectRecordsTask setKeepExistingSelection(Boolean keepExistingSelection) throws IllegalStateException
      For grids that allow multiple selection, should any existing selection be retained? Only applies when selecting records.
      Parameters:
      keepExistingSelection - New keepExistingSelection value. Default value is null
      Returns:
      GridSelectRecordsTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getKeepExistingSelection

      public Boolean getKeepExistingSelection()
      For grids that allow multiple selection, should any existing selection be retained? Only applies when selecting records.
      Returns:
      Current keepExistingSelection value. Default value is null
    • setScrollIntoView

      public GridSelectRecordsTask setScrollIntoView(Boolean scrollIntoView) throws IllegalStateException
      Set to false to prevent the first affected record from being scrolled into view.
      Parameters:
      scrollIntoView - New scrollIntoView value. Default value is null
      Returns:
      GridSelectRecordsTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getScrollIntoView

      public Boolean getScrollIntoView()
      Set to false to prevent the first affected record from being scrolled into view.
      Returns:
      Current scrollIntoView value. Default value is null
    • setSelect

      public GridSelectRecordsTask setSelect(Boolean select) throws IllegalStateException
      Set to false to clear selection.
      Parameters:
      select - New select value. Default value is null
      Returns:
      GridSelectRecordsTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getSelect

      public Boolean getSelect()
      Set to false to clear selection.
      Returns:
      Current select value. Default value is null
    • setSelectMultiple

      public GridSelectRecordsTask setSelectMultiple(Boolean selectMultiple) throws IllegalStateException
      Should multiple records matching Criteria be affected? If set to false only the first matching record is affected.
      Parameters:
      selectMultiple - New selectMultiple value. Default value is null
      Returns:
      GridSelectRecordsTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getSelectMultiple

      public Boolean getSelectMultiple()
      Should multiple records matching Criteria be affected? If set to false only the first matching record is affected.
      Returns:
      Current selectMultiple value. Default value is null