Class DocumentGridUtil
java.lang.Object
com.logicaldoc.gui.frontend.client.document.grid.DocumentGridUtil
Utility methods for documents grids
- Since:
- 7.0
- Author:
- Marco Meschieri - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.smartgwt.client.widgets.grid.ListGridRecord
fromDocument
(GUIDocument doc) static Integer
Gets the page size from the layout specification, the format is: |folderPageSize|pageSize|gridLayoutstatic String
getGridLayoutFromSpec
(String spec) Gets the grid layout specification, the format is: |folderPageSize|pageSize|gridLayout or simply gridLayoutstatic Long[]
getIds
(com.smartgwt.client.data.Record[] records) static Integer
getPageSizeFromSpec
(String spec) Gets the page size from the layout specification, the format is: |folderPageSize|pageSize|gridLayoutstatic String
getSortSpec
(com.smartgwt.client.data.SortSpecifier[] sortSpecifiers) static String
getSortSpec
(com.smartgwt.client.widgets.grid.ListGrid grid) Takes the sort specification of a grid.static GUIDocument
toDocument
(com.smartgwt.client.data.Record rec) static GUIDocument[]
toDocuments
(com.smartgwt.client.data.Record[] records) static void
updateRecord
(GUIDocument doc, com.smartgwt.client.data.Record rec)
-
Method Details
-
getIds
-
toDocuments
-
toDocument
-
fromDocument
-
updateRecord
-
getSortSpec
Takes the sort specification of a grid. It is a string of comma separated values each one defining the sorting of a specific attribute of the document, eg: fileName asc, date desc- Parameters:
grid
- the grid to inspect- Returns:
- the full sort specification
-
getSortSpec
-
getPageSizeFromSpec
Gets the page size from the layout specification, the format is: |folderPageSize|pageSize|gridLayout- Parameters:
spec
- layout specification- Returns:
- the page size
-
getFolderPageSizeFromSpec
Gets the page size from the layout specification, the format is: |folderPageSize|pageSize|gridLayout- Parameters:
spec
- layout specification- Returns:
- the page size
-
getGridLayoutFromSpec
Gets the grid layout specification, the format is: |folderPageSize|pageSize|gridLayout or simply gridLayout- Parameters:
spec
- layout specification- Returns:
- grid definition
-