Class Grids

java.lang.Object
com.levigo.jadice.web.client.grid.Grids

public class Grids extends Object
Utility methods to attach a Grid to a Document and retrieve or remove it.
  • Field Details

    • PROPERTY_KEY_GRID_INSTANCE

      public static final String PROPERTY_KEY_GRID_INSTANCE
      A Grid is stored in the document properties under this property key. As a Grid lives only temporarily on the Client side, this property will never be transferred to the server or persisted.
      See Also:
  • Method Details

    • hasGrid

      public static boolean hasGrid(Document doc)
      Checks if the given document has a Grid set in its document properties.
      Parameters:
      doc - the document
      Returns:
      true: The document has a grid set in the properties; false otherwise
    • getGridForDocument

      public static Grid getGridForDocument(Document doc)
      Returns the Grid for the given document. The grid will be fetched from the document properties.

      If there is no grid specified in the document properties, a new NoOpGrid will be returned.

      Parameters:
      doc - the document
      Returns:
      the grid (never null)
    • attachGridToDocument

      public static void attachGridToDocument(Document doc, Grid grid)
      Attaches the given Grid to the document by putting it into the document properties.
      Parameters:
      doc - the document
      grid - the grid
    • removeGridFromDocument

      public static void removeGridFromDocument(Document doc)
      Removes the known grid properties from the given map.
      Parameters:
      doc - the properties to remove the grid settings from