Class FGrid.AbstractGridExtension

java.lang.Object
com.vaadin.featurepack.ui.FGrid.AbstractGridExtension
All Implemented Interfaces:
ClientConnector, FAbstractClientConnector, Serializable
Direct Known Subclasses:
FGrid.AbstractRenderer
Enclosing class:
FGrid

public abstract static class FGrid.AbstractGridExtension extends Object implements FAbstractClientConnector, Serializable
An abstract base class for server-side Grid extensions.
See Also:
  • Constructor Details

    • AbstractGridExtension

      public AbstractGridExtension()
      Constructs a new Grid extension.
    • AbstractGridExtension

      public AbstractGridExtension(FGrid grid)
      Constructs a new Grid extension and extends given Grid.
      Parameters:
      grid - a grid instance
  • Method Details

    • getFParent

      public ClientConnector getFParent()
      Specified by:
      getFParent in interface ClientConnector
    • getItemId

      protected Object getItemId(String rowKey)
      Gets the item id for a row key.

      A key is used to identify a particular row on both a server and a client. This method can be used to get the item id for the row key that the client has sent.

      Parameters:
      rowKey - the row key for which to retrieve an item id
      Returns:
      the item id corresponding to key
    • getItemId

      protected Object getItemId(Item item)
    • getColumn

      protected FGrid.Column getColumn(String columnId)
      Gets the column for a column id.

      An id is used to identify a particular column on both a server and a client. This method can be used to get the column for the column id that the client has sent.

      Parameters:
      columnId - the column id for which to retrieve a column
      Returns:
      the column corresponding to columnId
    • getParentGrid

      protected FGrid getParentGrid()
      Gets the parent Grid of the renderer.
      Returns:
      parent grid
      Throws:
      IllegalStateException - if parent is not Grid
    • setParent

      public void setParent(FGrid grid)
    • refreshRow

      protected void refreshRow(Object itemId)
      Resends the row data for given item id to the client.
      Parameters:
      itemId - row to refresh