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 StringA Grid is stored in the document properties under this property key. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidattachGridToDocument(Document doc, Grid grid) Attaches the givenGridto the document by putting it into the document properties.static GridReturns theGridfor the given document.static booleanChecks if the given document has aGridset in its document properties.static voidRemoves 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 aGridset in its document properties.- Parameters:
doc- the document- Returns:
- true: The document has a grid set in the properties; false otherwise
-
getGridForDocument
Returns theGridfor the given document. The grid will be fetched from the document properties.If there is no grid specified in the document properties, a new
NoOpGridwill be returned.- Parameters:
doc- the document- Returns:
- the grid (never null)
-
attachGridToDocument
Attaches the givenGridto 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
-