com.smartgwt.client.util.workflow

## Class GridRemoveSelectedDataTask

- 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.GridRemoveSelectedDataTask

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class GridRemoveSelectedDataTask
      extends ComponentTask

  Remove data that is selected in a grid.
  See Also:
    `ListGrid.removeSelectedData()`

- - ### Field Summary

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

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GridRemoveSelectedDataTask()`
    `GridRemoveSelectedDataTask(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()`
    `java.lang.Boolean` | `getAllowMultiRecordRemove()` Can multiple records be removed? If not and multiple records are selected, the `refuseMultiRemoveMessage` is shown as a warning and the workflow is terminated.
    `java.lang.String` | `getConfirmationMessage()` Message shown to user to confirm deleting a single record on a bound grid.
    `java.lang.String` | `getFailureElement()` ID of the next sequence or element to proceed to if a failure condition arises from operation.
    `java.lang.String` | `getMultipleConfirmationMessage()` Message shown to user to confirm deleting a group of records on a bound grid.
    `static GridRemoveSelectedDataTask` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.String` | `getRefuseMultiRemoveMessage()` Message to be shown when multiple records are selected for removal but `allowMultiRecordRemove` is not set.
    `DSRequest` | `getRequestProperties()` Additional properties to set on the `removeSelectedData` call to perform removal.
    `java.lang.Boolean` | `getShowConfirmation()` Should we show a confirmation message before removal and allow the user to cancel the operation? If user cancels the removal the workflow is terminated.
    `java.lang.String` | `getUnboundConfirmationMessage()` Message shwon to user to confirm deleting a single record on an unbound grid.
    `java.lang.String` | `getUnboundMultipleConfirmationMessage()` Message shown to user to confirm deleting a group of records on an unbound grid.
    `GridRemoveSelectedDataTask` | `setAllowMultiRecordRemove(java.lang.Boolean allowMultiRecordRemove)` Can multiple records be removed? If not and multiple records are selected, the `refuseMultiRemoveMessage` is shown as a warning and the workflow is terminated.
    `GridRemoveSelectedDataTask` | `setConfirmationMessage(java.lang.String confirmationMessage)` Message shown to user to confirm deleting a single record on a bound grid.
    `GridRemoveSelectedDataTask` | `setFailureElement(java.lang.String failureElement)` ID of the next sequence or element to proceed to if a failure condition arises from operation.
    `GridRemoveSelectedDataTask` | `setMultipleConfirmationMessage(java.lang.String multipleConfirmationMessage)` Message shown to user to confirm deleting a group of records on a bound grid.
    `GridRemoveSelectedDataTask` | `setRefuseMultiRemoveMessage(java.lang.String refuseMultiRemoveMessage)` Message to be shown when multiple records are selected for removal but `allowMultiRecordRemove` is not set.
    `GridRemoveSelectedDataTask` | `setRequestProperties(DSRequest requestProperties)` Additional properties to set on the `removeSelectedData` call to perform removal.
    `GridRemoveSelectedDataTask` | `setShowConfirmation(java.lang.Boolean showConfirmation)` Should we show a confirmation message before removal and allow the user to cancel the operation? If user cancels the removal the workflow is terminated.
    `GridRemoveSelectedDataTask` | `setUnboundConfirmationMessage(java.lang.String unboundConfirmationMessage)` Message shwon to user to confirm deleting a single record on an unbound grid.
    `GridRemoveSelectedDataTask` | `setUnboundMultipleConfirmationMessage(java.lang.String unboundMultipleConfirmationMessage)` Message shown to user to confirm deleting a group of records on an unbound grid.

    - ### 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

    - #### GridRemoveSelectedDataTask

          public GridRemoveSelectedDataTask()

    - #### GridRemoveSelectedDataTask

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

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### create

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

      Overrides:
        `create` in class `ComponentTask`

    - #### setAllowMultiRecordRemove

          public GridRemoveSelectedDataTask setAllowMultiRecordRemove(java.lang.Boolean allowMultiRecordRemove)
                                                               throws java.lang.IllegalStateException

      Can multiple records be removed? If not and multiple records are selected, the `refuseMultiRemoveMessage` is shown as a warning and the workflow is terminated.

      Default is true unless set to `false`.

      Parameters:
        `allowMultiRecordRemove` - New allowMultiRecordRemove value. Default value is null
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getAllowMultiRecordRemove

          public java.lang.Boolean getAllowMultiRecordRemove()

      Can multiple records be removed? If not and multiple records are selected, the `refuseMultiRemoveMessage` is shown as a warning and the workflow is terminated.

      Default is true unless set to `false`.

      Returns:
        Current allowMultiRecordRemove value. Default value is null

    - #### setConfirmationMessage

          public GridRemoveSelectedDataTask setConfirmationMessage(java.lang.String confirmationMessage)
                                                            throws java.lang.IllegalStateException

      Message shown to user to confirm deleting a single record on a bound grid.

      This is a dynamic string - text within `${...}` are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only three dynamic variables, dsTitle; dsPluralTitle and recordTitle, are available and represent the bound `DataSource.title` and `DataSource.pluralTitle` and the value of the `DataSource.titleField` from the first selected record.

      Parameters:
        `confirmationMessage` - New confirmationMessage value. Default value is "Delete ${dsTitle} ${recordTitle}"
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getConfirmationMessage

          public java.lang.String getConfirmationMessage()

      Message shown to user to confirm deleting a single record on a bound grid.

      This is a dynamic string - text within `${...}` are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only three dynamic variables, dsTitle; dsPluralTitle and recordTitle, are available and represent the bound `DataSource.title` and `DataSource.pluralTitle` and the value of the `DataSource.titleField` from the first selected record.

      Returns:
        Current confirmationMessage value. Default value is "Delete ${dsTitle} ${recordTitle}"

    - #### setFailureElement

          public GridRemoveSelectedDataTask setFailureElement(java.lang.String failureElement)
                                                       throws java.lang.IllegalStateException

      ID of the next sequence or element to proceed to if a failure condition arises from operation.
      Parameters:
        `failureElement` - New failureElement value. Default value is null
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getFailureElement

          public java.lang.String getFailureElement()

      ID of the next sequence or element to proceed to if a failure condition arises from operation.
      Returns:
        Current failureElement value. Default value is null

    - #### setMultipleConfirmationMessage

          public GridRemoveSelectedDataTask setMultipleConfirmationMessage(java.lang.String multipleConfirmationMessage)
                                                                    throws java.lang.IllegalStateException

      Message shown to user to confirm deleting a group of records on a bound grid.

      This is a dynamic string - text within `${...}` are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only two dynamic variables, dsTitle and dsPluralTitle, are available and represent the bound `DataSource.title` and `DataSource.pluralTitle` .

      Parameters:
        `multipleConfirmationMessage` - New multipleConfirmationMessage value. Default value is "Delete multiple ${dsPluralTitle}?"
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getMultipleConfirmationMessage

          public java.lang.String getMultipleConfirmationMessage()

      Message shown to user to confirm deleting a group of records on a bound grid.

      This is a dynamic string - text within `${...}` are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only two dynamic variables, dsTitle and dsPluralTitle, are available and represent the bound `DataSource.title` and `DataSource.pluralTitle` .

      Returns:
        Current multipleConfirmationMessage value. Default value is "Delete multiple ${dsPluralTitle}?"

    - #### setRefuseMultiRemoveMessage

          public GridRemoveSelectedDataTask setRefuseMultiRemoveMessage(java.lang.String refuseMultiRemoveMessage)
                                                                 throws java.lang.IllegalStateException

      Message to be shown when multiple records are selected for removal but `allowMultiRecordRemove` is not set.
      Parameters:
        `refuseMultiRemoveMessage` - New refuseMultiRemoveMessage value. Default value is "Only one record may be removed at a time"
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getRefuseMultiRemoveMessage

          public java.lang.String getRefuseMultiRemoveMessage()

      Message to be shown when multiple records are selected for removal but `allowMultiRecordRemove` is not set.
      Returns:
        Current refuseMultiRemoveMessage value. Default value is "Only one record may be removed at a time"

    - #### setRequestProperties

          public GridRemoveSelectedDataTask setRequestProperties(DSRequest requestProperties)
                                                          throws java.lang.IllegalStateException

      Additional properties to set on the `removeSelectedData` call to perform removal.

      Note that `willHandleError` will always be set `true`.

      Parameters:
        `requestProperties` - New requestProperties value. Default value is null
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getRequestProperties

          public DSRequest getRequestProperties()

      Additional properties to set on the `removeSelectedData` call to perform removal.

      Note that `willHandleError` will always be set `true`.

      Returns:
        Current requestProperties value. Default value is null

    - #### setShowConfirmation

          public GridRemoveSelectedDataTask setShowConfirmation(java.lang.Boolean showConfirmation)
                                                         throws java.lang.IllegalStateException

      Should we show a confirmation message before removal and allow the user to cancel the operation? If user cancels the removal the workflow is terminated.

      Message to be shown is defined in the properties: `confirmationMessage`, `unboundConfirmationMessage`, `multipleConfirmationMessage` and `unboundMultipleConfirmationMessage`. The appropriate message is chosen based on the grid configuration and the number of records being removed.

      Parameters:
        `showConfirmation` - New showConfirmation value. Default value is null
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getShowConfirmation

          public java.lang.Boolean getShowConfirmation()

      Should we show a confirmation message before removal and allow the user to cancel the operation? If user cancels the removal the workflow is terminated.

      Message to be shown is defined in the properties: `confirmationMessage`, `unboundConfirmationMessage`, `multipleConfirmationMessage` and `unboundMultipleConfirmationMessage`. The appropriate message is chosen based on the grid configuration and the number of records being removed.

      Returns:
        Current showConfirmation value. Default value is null

    - #### setUnboundConfirmationMessage

          public GridRemoveSelectedDataTask setUnboundConfirmationMessage(java.lang.String unboundConfirmationMessage)
                                                                   throws java.lang.IllegalStateException

      Message shwon to user to confirm deleting a single record on an unbound grid.

      This is a dynamic string - text within `${...}` are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only one dynamic variable, recordTitle, is available and represents the value of the `DataSource.titleField` from the first selected record.

      Parameters:
        `unboundConfirmationMessage` - New unboundConfirmationMessage value. Default value is "Delete record?"
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getUnboundConfirmationMessage

          public java.lang.String getUnboundConfirmationMessage()

      Message shwon to user to confirm deleting a single record on an unbound grid.

      This is a dynamic string - text within `${...}` are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only one dynamic variable, recordTitle, is available and represents the value of the `DataSource.titleField` from the first selected record.

      Returns:
        Current unboundConfirmationMessage value. Default value is "Delete record?"

    - #### setUnboundMultipleConfirmationMessage

          public GridRemoveSelectedDataTask setUnboundMultipleConfirmationMessage(java.lang.String unboundMultipleConfirmationMessage)
                                                                           throws java.lang.IllegalStateException

      Message shown to user to confirm deleting a group of records on an unbound grid.

      This is a dynamic string - text within `${...}` are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only one dynamic variable, recordTitle, is available and represents the value of the `DataSource.titleField` from the first selected record.

      Parameters:
        `unboundMultipleConfirmationMessage` - New unboundMultipleConfirmationMessage value. Default value is "Delete multiple records?"
      Returns:
        `GridRemoveSelectedDataTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getUnboundMultipleConfirmationMessage

          public java.lang.String getUnboundMultipleConfirmationMessage()

      Message shown to user to confirm deleting a group of records on an unbound grid.

      This is a dynamic string - text within `${...}` are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only one dynamic variable, recordTitle, is available and represents the value of the `DataSource.titleField` from the first selected record.

      Returns:
        Current unboundMultipleConfirmationMessage value. Default value is "Delete multiple records?"