Interface FGrid.SelectionModel

All Superinterfaces:
Serializable
All Known Subinterfaces:
FGrid.SelectionModel.HasUserSelectionAllowed, FGrid.SelectionModel.Multi, FGrid.SelectionModel.None, FGrid.SelectionModel.Single
All Known Implementing Classes:
FGrid.AbstractSelectionModel, FGrid.MultiSelectionModel, FGrid.NoSelectionModel, FGrid.SingleSelectionModel
Enclosing class:
FGrid

public static interface FGrid.SelectionModel extends Serializable
The server-side interface that controls Grid's selection state.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Interface implemented by selection models which support disabling client side selection while still allowing programmatic selection on the server.
    static interface 
    A SelectionModel that supports multiple selections to be made.
    static interface 
    A SelectionModel that does not allow for rows to be selected.
    static interface 
    A SelectionModel that supports for only single rows to be selected at a time.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a collection of all the currently selected itemIds.
    boolean
    Checks whether an item is selected or not.
    void
    Resets the SelectiomModel to an initial state.
    void
    setGrid(FGrid grid)
    Injects the current Grid instance into the SelectionModel.
  • Method Details

    • isSelected

      boolean isSelected(Object itemId)
      Checks whether an item is selected or not.
      Parameters:
      itemId - the item id to check for
      Returns:
      true iff the item is selected
    • getSelectedRows

      Collection<Object> getSelectedRows()
      Returns a collection of all the currently selected itemIds.
      Returns:
      a collection of all the currently selected itemIds
    • setGrid

      void setGrid(FGrid grid)
      Injects the current Grid instance into the SelectionModel.

      Note: This method should not be called manually.

      Parameters:
      grid - the Grid in which the SelectionModel currently is, or null when a selection model is being detached from a Grid.
    • reset

      void reset()
      Resets the SelectiomModel to an initial state.

      Most often this means that the selection state is cleared, but implementations are free to interpret the "initial state" as they wish. Some, for example, may want to keep the first selected item as selected.