Class ComponentTask

All Implemented Interfaces:
HasHandlers
Direct Known Subclasses:
AddScreenTask, FetchRelatedDataTask, FormClearValuesTask, FormDisableFieldTask, FormEditNewRecordTask, FormEditSelectedTask, FormResetValuesTask, FormSaveDataTask, FormSetFieldValueTask, FormSetValuesTask, FormValidateValuesTask, GetPropertiesTask, GridEditRecordTask, GridExportClientDataTask, GridExportDataTask, GridFetchDataTask, GridRemoveSelectedDataTask, GridSaveAllEditsTask, GridSelectRecordsTask, GridSetEditValueTask, GridTransferDataTask, GridViewSelectedDataTask, NavigateSplitPaneTask, PrintCanvasTask, SetPropertiesTask, SetScreenDataTask, SetTitleTask, ShowComponentTask, ShowHideTask, ShowNextToComponentTask

public class ComponentTask extends ProcessElement
Base class for tasks that target SmartGWT UI-specific operations.

Note: This task is not for direct use - use one of the subclasses instead.

  • Constructor Details

    • ComponentTask

      public ComponentTask()
    • ComponentTask

      public ComponentTask(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static ComponentTask getOrCreateRef(JavaScriptObject jsObj)
    • create

      public JavaScriptObject create()
      Overrides:
      create in class ProcessElement
    • setComponentBaseClass

      public ComponentTask setComponentBaseClass(String componentBaseClass) throws IllegalStateException
      Base class of components that this task targets. The componentId must be an instance of one of the classes.
      Parameters:
      componentBaseClass - New componentBaseClass value. Default value is null
      Returns:
      ComponentTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getComponentBaseClass

      public String getComponentBaseClass()
      Base class of components that this task targets. The componentId must be an instance of one of the classes.
      Returns:
      Current componentBaseClass value. Default value is null
    • setComponentBaseClass

      public ComponentTask setComponentBaseClass(String... componentBaseClass) throws IllegalStateException
      Base class of components that this task targets. The componentId must be an instance of one of the classes.
      Parameters:
      componentBaseClass - New componentBaseClass value. Default value is null
      Returns:
      ComponentTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getComponentBaseClassAsStringArray

      public String[] getComponentBaseClassAsStringArray()
      Base class of components that this task targets. The componentId must be an instance of one of the classes.
      Returns:
      Current componentBaseClass value. Default value is null
    • setComponentId

      public ComponentTask setComponentId(String componentId) throws IllegalStateException
      ID of component targeted by this task.
      Parameters:
      componentId - New componentId value. Default value is null
      Returns:
      ComponentTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
      See Also:
    • getComponentId

      public String getComponentId()
      ID of component targeted by this task.
      Returns:
      Current componentId value. Default value is null
      See Also:
    • setComponentRequiresDataSource

      public ComponentTask setComponentRequiresDataSource(Boolean componentRequiresDataSource) throws IllegalStateException
      Must target components of this task have a DataSource?
      Parameters:
      componentRequiresDataSource - New componentRequiresDataSource value. Default value is null
      Returns:
      ComponentTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getComponentRequiresDataSource

      public Boolean getComponentRequiresDataSource()
      Must target components of this task have a DataSource?
      Returns:
      Current componentRequiresDataSource value. Default value is null
    • setTargetBaseClass

      public ComponentTask setTargetBaseClass(String targetBaseClass) throws IllegalStateException
      Base class of components and any required or optional scope that this task targets. The componentId may not be an instance itself but when combined with the additional scope (targetFieldName, targetSectionName, ...) the actual target must be an instance of one of the classes.

      This can be used by an editor to limit or verify the user's selection.

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

      public String getTargetBaseClass()
      Base class of components and any required or optional scope that this task targets. The componentId may not be an instance itself but when combined with the additional scope (targetFieldName, targetSectionName, ...) the actual target must be an instance of one of the classes.

      This can be used by an editor to limit or verify the user's selection.

      Returns:
      Current targetBaseClass value. Default value is null
    • setTargetBaseClass

      public ComponentTask setTargetBaseClass(String... targetBaseClass) throws IllegalStateException
      Base class of components and any required or optional scope that this task targets. The componentId may not be an instance itself but when combined with the additional scope (targetFieldName, targetSectionName, ...) the actual target must be an instance of one of the classes.

      This can be used by an editor to limit or verify the user's selection.

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

      public String[] getTargetBaseClassAsStringArray()
      Base class of components and any required or optional scope that this task targets. The componentId may not be an instance itself but when combined with the additional scope (targetFieldName, targetSectionName, ...) the actual target must be an instance of one of the classes.

      This can be used by an editor to limit or verify the user's selection.

      Returns:
      Current targetBaseClass value. Default value is null
    • setUnsupportedComponentMessage

      public ComponentTask setUnsupportedComponentMessage(String unsupportedComponentMessage) throws IllegalStateException
      The default message to be reported with getInvalidTaskMessage() when a target component type is not supported for the task.
      Parameters:
      unsupportedComponentMessage - New unsupportedComponentMessage value. Default value is "${propertyName} '${id}' is not a supported type for this task"
      Returns:
      ComponentTask instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getUnsupportedComponentMessage

      public String getUnsupportedComponentMessage()
      The default message to be reported with getInvalidTaskMessage() when a target component type is not supported for the task.
      Returns:
      Current unsupportedComponentMessage value. Default value is "${propertyName} '${id}' is not a supported type for this task"
    • getTargetComponent

      public void getTargetComponent(Process process)
      Returns the actual component specified by componentId for this task. Unless skipValidation is true, the component type is validated against componentBaseClass and only returned if it matches. Null is returned otherwise.
      Parameters:
      process - the process that is handling the workflow
    • getTargetComponent

      public void getTargetComponent(Process process, Boolean skipValidation)
      Returns the actual component specified by componentId for this task. Unless skipValidation is true, the component type is validated against componentBaseClass and only returned if it matches. Null is returned otherwise.
      Parameters:
      process - the process that is handling the workflow
      skipValidation - skip validation against componentBaseClass?