Class Grids
java.lang.Object
com.levigo.jadice.web.client.grid.Grids
Utility methods to attach a Grid to a Document and retrieve or remove it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
A Grid is stored in the document properties under this property key. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
attachGridToDocument
(Document doc, Grid grid) Attaches the givenGrid
to the document by putting it into the document properties.static Grid
Returns theGrid
for the given document.static boolean
Checks if the given document has aGrid
set in its document properties.static void
Removes the known grid properties from the given map.
-
Field Details
-
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
Checks if the given document has aGrid
set in its document properties.- Parameters:
doc
- the document- Returns:
- true: The document has a grid set in the properties; false otherwise
-
getGridForDocument
Returns theGrid
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
Attaches the givenGrid
to the document by putting it into the document properties.- Parameters:
doc
- the documentgrid
- the grid
-
removeGridFromDocument
Removes the known grid properties from the given map.- Parameters:
doc
- the properties to remove the grid settings from
-