com.smartgwt.client.util.workflow

## Class GridSelectRecordsTask

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.util.workflow.ProcessElement
    - - com.smartgwt.client.util.workflow.ComponentTask
      - - com.smartgwt.client.util.workflow.GridSelectRecordsTask

- All Implemented Interfaces:
    com.google.gwt.event.shared.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.

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.BaseClass

      `config, configOnly, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GridSelectRecordsTask()`
    `GridSelectRecordsTask(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `Criteria` | `getCriteria()` Criteria defining the records that should be selected or deselected.
    `java.lang.Boolean` | `getKeepExistingSelection()` For grids that allow multiple selection, should any existing selection be retained? Only applies when selecting records.
    `static GridSelectRecordsTask` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.Boolean` | `getScrollIntoView()` Set to `false` to prevent the first affected record from being scrolled into view.
    `java.lang.Boolean` | `getSelect()` Set to `false` to clear selection.
    `java.lang.Boolean` | `getSelectMultiple()` Should multiple records matching `Criteria` be affected? If set to `false` only the first matching record is affected.
    `GridSelectRecordsTask` | `setCriteria(Criteria criteria)` Criteria defining the records that should be selected or deselected.
    `GridSelectRecordsTask` | `setKeepExistingSelection(java.lang.Boolean keepExistingSelection)` For grids that allow multiple selection, should any existing selection be retained? Only applies when selecting records.
    `GridSelectRecordsTask` | `setScrollIntoView(java.lang.Boolean scrollIntoView)` Set to `false` to prevent the first affected record from being scrolled into view.
    `GridSelectRecordsTask` | `setSelect(java.lang.Boolean select)` Set to `false` to clear selection.
    `GridSelectRecordsTask` | `setSelectMultiple(java.lang.Boolean selectMultiple)` Should multiple records matching `Criteria` be affected? If set to `false` only the first matching record is affected.

    - ### Methods inherited from class com.smartgwt.client.util.workflow.ComponentTask

      `getComponentBaseClass, getComponentBaseClassAsStringArray, getComponentId, getComponentRequiresDataSource, getTargetBaseClass, getTargetBaseClassAsStringArray, getTargetComponent, getTargetComponent, getUnsupportedComponentMessage, setComponentBaseClass, setComponentBaseClass, setComponentId, setComponentRequiresDataSource, setTargetBaseClass, setTargetBaseClass, setUnsupportedComponentMessage`

    - ### Methods inherited from class com.smartgwt.client.util.workflow.ProcessElement

      `completeElement, convertToJavaScriptArray, executeElement, getBindOutput, getClassDescription, getComponentReferences, getDescription, getDynamicValue, getEditorType, getElementDescription, getForceSingle, getID, getInvalidTaskMessage, getJsObj, getMockMode, getNextElement, getOrCreateJsObj, getPassThruOutput, getProcessElements, getSupportsMultipleInputRecords, getTextFormulaValue, getTypeTitle, getUndefinedComponentMessage, getUnresolvedComponentMessage, getWaitDuration, getWaitFor, getWaitLocator, isCreated, isValid, objectReferencesLastTaskOutput, onInit, reset, setAttribute, setBindOutput, setClassDescription, setDescription, setEditorType, setForceSingle, setID, setJavaScriptObject, setMockMode, setNextElement, setPassThruOutput, setSupportsMultipleInputRecords, setTypeTitle, setUndefinedComponentMessage, setUnresolvedComponentMessage, setWaitDuration, setWaitFor, setWaitLocator, updateGlobalIDInCriteria, updateGlobalIDInTextFormula, updateGlobalIDInValueProperty, updateGlobalIDInValues, updateGlobalIDReferences, updateLastElementBindingReferences, updateLastElementInCriteria, updateLastElementInValueProperty, updateLastElementInValues`

    - ### Methods inherited from class com.smartgwt.client.core.BaseClass

      `addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GridSelectRecordsTask

          public GridSelectRecordsTask()

    - #### GridSelectRecordsTask

          public GridSelectRecordsTask(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static GridSelectRecordsTask getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### create

          public com.google.gwt.core.client.JavaScriptObject create()

      Overrides:
        `create` in class `ComponentTask`

    - #### setCriteria

          public GridSelectRecordsTask setCriteria(Criteria criteria)
                                            throws java.lang.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:
        `java.lang.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(java.lang.Boolean keepExistingSelection)
                                                         throws java.lang.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:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getKeepExistingSelection

          public java.lang.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(java.lang.Boolean scrollIntoView)
                                                  throws java.lang.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:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getScrollIntoView

          public java.lang.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(java.lang.Boolean select)
                                          throws java.lang.IllegalStateException

      Set to `false` to clear selection.
      Parameters:
        `select` - New select value. Default value is null
      Returns:
        `GridSelectRecordsTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getSelect

          public java.lang.Boolean getSelect()

      Set to `false` to clear selection.
      Returns:
        Current select value. Default value is null

    - #### setSelectMultiple

          public GridSelectRecordsTask setSelectMultiple(java.lang.Boolean selectMultiple)
                                                  throws java.lang.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:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getSelectMultiple

          public java.lang.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