Class Shuttle

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers, HasMembersChangedHandlers

public class Shuttle extends Layout
Shuttle-style selection component allowing uses to select records by moving them from a set of source records to a set of target records
  • Constructor Details

  • Method Details

    • getOrCreateRef

      public static Shuttle getOrCreateRef(JavaScriptObject jsObj)
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • create

      protected JavaScriptObject create()
      Overrides:
      create in class Layout
    • getControlBar

      public VLayout getControlBar() throws IllegalStateException
      VLayout autoChild holding the selectAllButton, selectButton, deselectButton and deselectAllButton

      This component is an AutoChild named "controlBar". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current controlBar value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setData

      public Shuttle setData(Record... data) throws IllegalStateException
      List of options for this shuttle.

      Note that a shuttle must have either a data object or a dataSource specified

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

      public Shuttle setDataSource(DataSource dataSource) throws IllegalStateException
      DataSource for this shuttle's data set. The list of options will be fetched from this dataSource unless an explicit data object was also provided.

      Note that a shuttle must have either a dataSource or data object.

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

      public DataSource getDataSource()
      DataSource for this shuttle's data set. The list of options will be fetched from this dataSource unless an explicit data object was also provided.

      Note that a shuttle must have either a dataSource or data object.

      Returns:
      Current dataSource value. Default value is null
    • getDeselectAllButton

      public ImgButton getDeselectAllButton() throws IllegalStateException
      ImgButton for deselecting the full set of selected data in the shuttle.

      This component is an AutoChild named "deselectAllButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current deselectAllButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setDeselectAllButtonHeight

      public Shuttle setDeselectAllButtonHeight(Integer deselectAllButtonHeight) throws IllegalStateException
      Height for the deselectAllButton
      Parameters:
      deselectAllButtonHeight - New deselectAllButtonHeight value. Default value is 22
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDeselectAllButtonHeight

      public Integer getDeselectAllButtonHeight()
      Height for the deselectAllButton
      Returns:
      Current deselectAllButtonHeight value. Default value is 22
    • setDeselectAllButtonIcon

      public Shuttle setDeselectAllButtonIcon(String deselectAllButtonIcon) throws IllegalStateException
      Icon for the deselectAllButton
      Parameters:
      deselectAllButtonIcon - New deselectAllButtonIcon value. Default value is "[SKINIMG]TransferIcons/left_all.png"
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDeselectAllButtonIcon

      public String getDeselectAllButtonIcon()
      Icon for the deselectAllButton
      Returns:
      Current deselectAllButtonIcon value. Default value is "[SKINIMG]TransferIcons/left_all.png"
      See Also:
    • setDeselectAllButtonWidth

      public Shuttle setDeselectAllButtonWidth(Integer deselectAllButtonWidth) throws IllegalStateException
      Width for the deselectAllButton
      Parameters:
      deselectAllButtonWidth - New deselectAllButtonWidth value. Default value is 24
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDeselectAllButtonWidth

      public Integer getDeselectAllButtonWidth()
      Width for the deselectAllButton
      Returns:
      Current deselectAllButtonWidth value. Default value is 24
    • getDeselectButton

      public ImgButton getDeselectButton() throws IllegalStateException
      ImgButton for deselecting a single record

      This component is an AutoChild named "deselectButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current deselectButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setDeselectButtonHeight

      public Shuttle setDeselectButtonHeight(Integer deselectButtonHeight) throws IllegalStateException
      Height for the deselectButton
      Parameters:
      deselectButtonHeight - New deselectButtonHeight value. Default value is 22
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDeselectButtonHeight

      public Integer getDeselectButtonHeight()
      Height for the deselectButton
      Returns:
      Current deselectButtonHeight value. Default value is 22
    • setDeselectButtonIcon

      public Shuttle setDeselectButtonIcon(String deselectButtonIcon) throws IllegalStateException
      Icon for the deselectButton
      Parameters:
      deselectButtonIcon - New deselectButtonIcon value. Default value is "[SKINIMG]TransferIcons/left.png"
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDeselectButtonIcon

      public String getDeselectButtonIcon()
      Icon for the deselectButton
      Returns:
      Current deselectButtonIcon value. Default value is "[SKINIMG]TransferIcons/left.png"
      See Also:
    • setDeselectButtonWidth

      public Shuttle setDeselectButtonWidth(Integer deselectButtonWidth) throws IllegalStateException
      Width for the deselectButton
      Parameters:
      deselectButtonWidth - New deselectButtonWidth value. Default value is 24
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDeselectButtonWidth

      public Integer getDeselectButtonWidth()
      Width for the deselectButton
      Returns:
      Current deselectButtonWidth value. Default value is 24
    • setFetchOperation

      public Shuttle setFetchOperation(String fetchOperation) throws IllegalStateException
      OperationId for fetching records from the shuttle's DataSource.
      Parameters:
      fetchOperation - New fetchOperation value. Default value is null
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFetchOperation

      public String getFetchOperation()
      OperationId for fetching records from the shuttle's DataSource.
      Returns:
      Current fetchOperation value. Default value is null
    • setFields

      public Shuttle setFields(ListGridField... fields) throws IllegalStateException
      Fields for the sourceGrid and targetGrid.

      As with other databound components, if fields are not explicitly specified, they will be derived from the dataSource as described here

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

      public ListGridField[] getFields()
      Fields for the sourceGrid and targetGrid.

      As with other databound components, if fields are not explicitly specified, they will be derived from the dataSource as described here

      Returns:
      Current fields value. Default value is null
    • setFilterContext

      public Shuttle setFilterContext(DSRequest filterContext) throws IllegalStateException
      DSRequest configuration for retrieving records from this shuttle's dataSource.
      Parameters:
      filterContext - New filterContext value. Default value is null
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getFilterContext

      public DSRequest getFilterContext()
      DSRequest configuration for retrieving records from this shuttle's dataSource.
      Returns:
      Current filterContext value. Default value is null
    • setImplicitCriteria

      public Shuttle setImplicitCriteria(Criteria implicitCriteria)
      Implicit criteria for retrieving records from this shuttle's dataSource.

      These criteria may be combined with "inSet" or "notInSet" sub criteria for the valueField in order to populate the set of unselected records in the sourceGrid. They are ListGrid.implicitCriteria meaning that any user-entered filter criteria will be overlayed on top of these criteria.

      If this method is called after the component has been drawn/initialized: Update the implicitCriteria for the shuttle.

      Parameters:
      implicitCriteria - new implicitCriteria. Default value is null
      Returns:
      Shuttle instance, for chaining setter calls
    • getImplicitCriteria

      public Criteria getImplicitCriteria()
      Implicit criteria for retrieving records from this shuttle's dataSource.

      These criteria may be combined with "inSet" or "notInSet" sub criteria for the valueField in order to populate the set of unselected records in the sourceGrid. They are ListGrid.implicitCriteria meaning that any user-entered filter criteria will be overlayed on top of these criteria.

      Returns:
      Current implicitCriteria value. Default value is null
    • setIncompleteDataWarning

      public Shuttle setIncompleteDataWarning(String incompleteDataWarning) throws IllegalStateException
      Warning to display when the user attempts to select all records from a partially loaded data set.
      Parameters:
      incompleteDataWarning - New incompleteDataWarning value. Default value is "Unable to select all - the data set does not have all matching records loaded from the dataSource."
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getIncompleteDataWarning

      public String getIncompleteDataWarning()
      Warning to display when the user attempts to select all records from a partially loaded data set.
      Returns:
      Current incompleteDataWarning value. Default value is "Unable to select all - the data set does not have all matching records loaded from the dataSource."
    • setInitialSort

      public Shuttle setInitialSort(SortSpecifier... initialSort) throws IllegalStateException
      Initial sort specifiers for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Parameters:
      initialSort - New initialSort value. Default value is null
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getInitialSort

      public SortSpecifier[] getInitialSort()
      Initial sort specifiers for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Returns:
      Current initialSort value. Default value is null
    • setLoadingPlaceholderAttribute

      public Shuttle setLoadingPlaceholderAttribute(String loadingPlaceholderAttribute) throws IllegalStateException
      This attribute will be set to true for any loading placeholder records returned by getSelectedRecords()

      Note : This is an advanced setting

      Parameters:
      loadingPlaceholderAttribute - New loadingPlaceholderAttribute value. Default value is "_isLoadingPlaceholder"
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLoadingPlaceholderAttribute

      public String getLoadingPlaceholderAttribute()
      This attribute will be set to true for any loading placeholder records returned by getSelectedRecords()
      Returns:
      Current loadingPlaceholderAttribute value. Default value is "_isLoadingPlaceholder"
    • getSelectAllButton

      public ImgButton getSelectAllButton() throws IllegalStateException
      ImgButton for selecting the full set of data in the shuttle.

      This component is an AutoChild named "selectAllButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current selectAllButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setSelectAllButtonHeight

      public Shuttle setSelectAllButtonHeight(Integer selectAllButtonHeight) throws IllegalStateException
      Height for the selectAllButton
      Parameters:
      selectAllButtonHeight - New selectAllButtonHeight value. Default value is 22
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSelectAllButtonHeight

      public Integer getSelectAllButtonHeight()
      Height for the selectAllButton
      Returns:
      Current selectAllButtonHeight value. Default value is 22
    • setSelectAllButtonIcon

      public Shuttle setSelectAllButtonIcon(String selectAllButtonIcon) throws IllegalStateException
      Icon for the selectAllButton
      Parameters:
      selectAllButtonIcon - New selectAllButtonIcon value. Default value is "[SKINIMG]TransferIcons/right_all.png"
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSelectAllButtonIcon

      public String getSelectAllButtonIcon()
      Icon for the selectAllButton
      Returns:
      Current selectAllButtonIcon value. Default value is "[SKINIMG]TransferIcons/right_all.png"
      See Also:
    • setSelectAllButtonWidth

      public Shuttle setSelectAllButtonWidth(Integer selectAllButtonWidth) throws IllegalStateException
      Width for the selectAllButton
      Parameters:
      selectAllButtonWidth - New selectAllButtonWidth value. Default value is 24
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSelectAllButtonWidth

      public Integer getSelectAllButtonWidth()
      Width for the selectAllButton
      Returns:
      Current selectAllButtonWidth value. Default value is 24
    • getSelectButton

      public ImgButton getSelectButton() throws IllegalStateException
      ImgButton for selecting a single record

      This component is an AutoChild named "selectButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current selectButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setSelectButtonHeight

      public Shuttle setSelectButtonHeight(Integer selectButtonHeight) throws IllegalStateException
      Height for the selectButton
      Parameters:
      selectButtonHeight - New selectButtonHeight value. Default value is 22
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSelectButtonHeight

      public Integer getSelectButtonHeight()
      Height for the selectButton
      Returns:
      Current selectButtonHeight value. Default value is 22
    • setSelectButtonIcon

      public Shuttle setSelectButtonIcon(String selectButtonIcon) throws IllegalStateException
      Icon for the selectButton
      Parameters:
      selectButtonIcon - New selectButtonIcon value. Default value is "[SKINIMG]TransferIcons/right.png"
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSelectButtonIcon

      public String getSelectButtonIcon()
      Icon for the selectButton
      Returns:
      Current selectButtonIcon value. Default value is "[SKINIMG]TransferIcons/right.png"
      See Also:
    • setSelectButtonWidth

      public Shuttle setSelectButtonWidth(Integer selectButtonWidth) throws IllegalStateException
      Width for the selectButton
      Parameters:
      selectButtonWidth - New selectButtonWidth value. Default value is 24
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSelectButtonWidth

      public Integer getSelectButtonWidth()
      Width for the selectButton
      Returns:
      Current selectButtonWidth value. Default value is 24
    • setSelectedRecords

      public Shuttle setSelectedRecords(ListGridRecord selectedRecords) throws IllegalStateException
      Initial set of selected records for the shuttle.

      See also selectedValues for initializing selection based on record values.

      To update the selection at runtime use selectRecords() and deselectRecords().

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

      public ListGridRecord getSelectedRecords()
      Initial set of selected records for the shuttle.

      See also selectedValues for initializing selection based on record values.

      To update the selection at runtime use selectRecords() and deselectRecords().

      Returns:
      Returns the current set of selected records.

      Note that if a user called setSelectedByValue() for a record that was not loaded in the source list, we may not yet have a selected record for that value. See valuesFetchInProgress().

      In this case no record will be returned by this method for that record by default. The includeLoadingPlaceholders parameter will cause this method to also return placeholder record objects for these unloaded records, which have two properties specified - the valueField value _isLoadingPlaceholder:true. Default value is null

    • setSelectedValues

      public Shuttle setSelectedValues(String... selectedValues) throws IllegalStateException
      Initial selected values for the shuttle.

      If specified, the shuttle will be initialized with records with matching valueField being selected.

      See also selectedRecords for initializing selection with specific records. If both properties are specified, selectedValues will have no effect

      To update the selection by value at runtime use setSelectedByValue()

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

      public String[] getSelectedValues()
      Initial selected values for the shuttle.

      If specified, the shuttle will be initialized with records with matching valueField being selected.

      See also selectedRecords for initializing selection with specific records. If both properties are specified, selectedValues will have no effect

      To update the selection by value at runtime use setSelectedByValue()

      Returns:
      Returns the valueField value from the current set of selected records.

      Note that if a user called setSelectedByValue() for a record that was not loaded in the source list, we may not yet have a selected record for that value. See valuesFetchInProgress().

      The includeUnloadedValues parameter can be used to return values for these unloaded records. Default value is null

    • setSelectedValues

      public Shuttle setSelectedValues(int... selectedValues) throws IllegalStateException
      Initial selected values for the shuttle.

      If specified, the shuttle will be initialized with records with matching valueField being selected.

      See also selectedRecords for initializing selection with specific records. If both properties are specified, selectedValues will have no effect

      To update the selection by value at runtime use setSelectedByValue()

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

      public int[] getSelectedValuesAsIntArray()
      Initial selected values for the shuttle.

      If specified, the shuttle will be initialized with records with matching valueField being selected.

      See also selectedRecords for initializing selection with specific records. If both properties are specified, selectedValues will have no effect

      To update the selection by value at runtime use setSelectedByValue()

      Returns:
      Returns the valueField value from the current set of selected records.

      Note that if a user called setSelectedByValue() for a record that was not loaded in the source list, we may not yet have a selected record for that value. See valuesFetchInProgress().

      The includeUnloadedValues parameter can be used to return values for these unloaded records. Default value is null

    • setSortDirection

      public Shuttle setSortDirection(SortDirection sortDirection) throws IllegalStateException
      Sort direction for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Parameters:
      sortDirection - New sortDirection value. Default value is null
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSortDirection

      public SortDirection getSortDirection()
      Sort direction for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Returns:
      Current sortDirection value. Default value is null
    • setSortField

      public Shuttle setSortField(String sortField) throws IllegalStateException
      Sort field for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Parameters:
      sortField - New sortField value. Default value is null
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSortField

      public String getSortField()
      Sort field for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Returns:
      Current sortField value. Default value is null
    • setSortField

      public Shuttle setSortField(String... sortField) throws IllegalStateException
      Sort field for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Parameters:
      sortField - New sortField value. Default value is null
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSortFieldAsStringArray

      public String[] getSortFieldAsStringArray()
      Sort field for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Returns:
      Current sortField value. Default value is null
    • setSortField

      public Shuttle setSortField(Integer sortField) throws IllegalStateException
      Sort field for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Parameters:
      sortField - New sortField value. Default value is null
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSortFieldAsInt

      public Integer getSortFieldAsInt()
      Sort field for this item's list of options. Will be applied to sourceGrid and targetGrid. To specify initial sort for each grid separately, these properties may be set per grid using the standard autoChild pattern.
      Returns:
      Current sortField value. Default value is null
    • getSourceGrid

      public ListGrid getSourceGrid() throws IllegalStateException
      List grid containing the (unselected) set of records. The user may select items by dragging them from this grid to the targetGrid.

      This component is an AutoChild named "sourceGrid". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current sourceGrid value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setSourceGridTitle

      public Shuttle setSourceGridTitle(String sourceGridTitle) throws IllegalStateException
      Title for the source grid, shown as a Canvas.groupTitle
      Parameters:
      sourceGridTitle - New sourceGridTitle value. Default value is "Unselected Values"
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSourceGridTitle

      public String getSourceGridTitle()
      Title for the source grid, shown as a Canvas.groupTitle
      Returns:
      Current sourceGridTitle value. Default value is "Unselected Values"
    • getTargetGrid

      public ListGrid getTargetGrid() throws IllegalStateException
      List grid containing the selected set of records. The user may unselect items by dragging them from this grid to the sourceGrid.

      This component is an AutoChild named "targetGrid". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current targetGrid value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setTargetGridTitle

      public Shuttle setTargetGridTitle(String targetGridTitle) throws IllegalStateException
      Title for the target grid, shown as a Canvas.groupTitle
      Parameters:
      targetGridTitle - New targetGridTitle value. Default value is "Selected Values"
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTargetGridTitle

      public String getTargetGridTitle()
      Title for the target grid, shown as a Canvas.groupTitle
      Returns:
      Current targetGridTitle value. Default value is "Selected Values"
    • setTextMatchStyle

      public Shuttle setTextMatchStyle(TextMatchStyle textMatchStyle) throws IllegalStateException
      TextMatchStyle for retrieving records from this shuttle's dataSource.
      Parameters:
      textMatchStyle - New textMatchStyle value. Default value is "substring"
      Returns:
      Shuttle instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTextMatchStyle

      public TextMatchStyle getTextMatchStyle()
      TextMatchStyle for retrieving records from this shuttle's dataSource.
      Returns:
      Current textMatchStyle value. Default value is "substring"
    • setValueField

      public Shuttle setValueField(String valueField) throws IllegalStateException
      This field is expected to be unique for records within the shuttle's data set. If not explicitly specified the dataSource.primaryKey will be used.

      May be used to select records by value and to retrieve the current selected values.

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

      public String getValueField()
      This field is expected to be unique for records within the shuttle's data set. If not explicitly specified the dataSource.primaryKey will be used.

      May be used to select records by value and to retrieve the current selected values.

      Returns:
      Current valueField value. Default value is null
    • clearSelection

      public void clearSelection()
      Deselect all currently selected records
    • clearSelection

      public void clearSelection(boolean fireSelectionChanged)
      Deselect all currently selected records
      Parameters:
      fireSelectionChanged - Fire the selectionUpdated() notification?
    • deselectRecords

      public void deselectRecords(ListGridRecord[] records)
      Programmatically deselect a set of records that are currently selected and displayed in the target grid.
      Parameters:
      records - Records to deselect
    • deselectRecords

      public void deselectRecords(ListGridRecord[] records, boolean fireSelectionChanged)
      Programmatically deselect a set of records that are currently selected and displayed in the target grid.
      Parameters:
      records - Records to deselect
      fireSelectionChanged - Fire the selectionUpdated() notification?
    • getValueFieldName

      public String getValueFieldName()
      Returns the valueField for this shuttle
      Returns:
      value field name
    • selectionUpdated

      public void selectionUpdated()
      Notification method fired when records are selected or unselected in this shuttle.

      Use getSelectedRecords() or getSelectedValues() to retrieve the current selection.

    • selectRecords

      public void selectRecords(ListGridRecord[] records)
      Programmatically select a set of records from this shuttle's dataSource. The specified records will be added to any existing selection.
      Parameters:
      records - Records to select
    • selectRecords

      public void selectRecords(ListGridRecord[] records, boolean fireSelectionChanged)
      Programmatically select a set of records from this shuttle's dataSource. The specified records will be added to any existing selection.
      Parameters:
      records - Records to select
      fireSelectionChanged - Fire the selectionUpdated() notification?
    • setSelectedByValue

      public void setSelectedByValue(String[] value, Boolean selected)
      Method to add or remove records from the current selection where the valueField matches the values passed in.

      If the source listGrid does not have a complete data set and does not contain an entry for any of the requested values, a separate fetch request will be issued against our DataSource to pick up the records for the specified value(s). The valuesFetchInProgress() and valuesFetchComplete() methods provide information about this fetch.

      Parameters:
      value - Array of values to select
      selected - New selected state for the records
    • setSelectedByValue

      public void setSelectedByValue(int[] value, Boolean selected)
      Method to add or remove records from the current selection where the valueField matches the values passed in.

      If the source listGrid does not have a complete data set and does not contain an entry for any of the requested values, a separate fetch request will be issued against our DataSource to pick up the records for the specified value(s). The valuesFetchInProgress() and valuesFetchComplete() methods provide information about this fetch.

      Parameters:
      value - Array of values to select
      selected - New selected state for the records
    • valuesFetchComplete

      public boolean valuesFetchComplete()
      Notification method fired when a fetch to retrieve records for an array of values passed to setSelectedByValue() is complete.

      Note that if no associated record for the specified value was found in the dataSource, this method will still fire.

      Returns:
      true if there is an outstanding values fetch
    • valuesFetchInProgress

      public boolean valuesFetchInProgress()
      Returns true if this shuttle is currently fetching record(s) associated with values passed to setSelectedByValue()

      If no explicit value parameter was passed, this method will return true if this shuttle has any outstanding values fetches.

      Returns:
      true if there is an outstanding values fetch
    • valuesFetchInProgress

      public boolean valuesFetchInProgress(Object value)
      Returns true if this shuttle is currently fetching record(s) associated with values passed to setSelectedByValue()

      If no explicit value parameter was passed, this method will return true if this shuttle has any outstanding values fetches.

      Parameters:
      value - if passed, this method will return true only if there is an outstanding fetch to retrieve the associated record for this specified value
      Returns:
      true if there is an outstanding values fetch
    • setDefaultProperties

      public static void setDefaultProperties(Shuttle shuttleProperties)
      Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

      Parameters:
      shuttleProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(ShuttleLogicalStructure s)
      Setter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
    • getLogicalStructure

      public LogicalStructureObject getLogicalStructure()
      Getter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
      Specified by:
      getLogicalStructure in interface LogicalStructure
      Overrides:
      getLogicalStructure in class Layout