Class GridRemoveSelectedDataTask

All Implemented Interfaces:
HasHandlers

public class GridRemoveSelectedDataTask extends ComponentTask
Remove data that is selected in a grid.
See Also:
  • Constructor Details

    • GridRemoveSelectedDataTask

      public GridRemoveSelectedDataTask()
    • GridRemoveSelectedDataTask

      public GridRemoveSelectedDataTask(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static GridRemoveSelectedDataTask getOrCreateRef(JavaScriptObject jsObj)
    • create

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

      public GridRemoveSelectedDataTask setAllowMultiRecordRemove(Boolean allowMultiRecordRemove) throws 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:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getAllowMultiRecordRemove

      public 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(String confirmationMessage) throws 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:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getConfirmationMessage

      public 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(String failureElement) throws 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:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getFailureElement

      public 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(String multipleConfirmationMessage) throws 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:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getMultipleConfirmationMessage

      public 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(String refuseMultiRemoveMessage) throws 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:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getRefuseMultiRemoveMessage

      public 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 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:
      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(Boolean showConfirmation) throws 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:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getShowConfirmation

      public 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(String unboundConfirmationMessage) throws 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:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getUnboundConfirmationMessage

      public 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(String unboundMultipleConfirmationMessage) throws 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:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getUnboundMultipleConfirmationMessage

      public 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?"