Class GridUtil
- java.lang.Object
-
- com.logicaldoc.gui.frontend.client.document.grid.GridUtil
-
public class GridUtil extends Object
Utility methods for documents grids- Since:
- 7.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description GridUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.smartgwt.client.widgets.grid.ListGridRecord
fromDocument(GUIDocument doc)
static String
getGridLayoutFromSpec(String spec)
Gets the grid layout specification, the format is: |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: |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 record)
static GUIDocument[]
toDocuments(com.smartgwt.client.data.Record[] records)
static void
updateRecord(GUIDocument doc, com.smartgwt.client.data.Record record)
-
-
-
Method Detail
-
getIds
public static long[] getIds(com.smartgwt.client.data.Record[] records)
-
toDocuments
public static GUIDocument[] toDocuments(com.smartgwt.client.data.Record[] records)
-
toDocument
public static GUIDocument toDocument(com.smartgwt.client.data.Record record)
-
fromDocument
public static com.smartgwt.client.widgets.grid.ListGridRecord fromDocument(GUIDocument doc)
-
updateRecord
public static void updateRecord(GUIDocument doc, com.smartgwt.client.data.Record record)
-
getSortSpec
public static String getSortSpec(com.smartgwt.client.widgets.grid.ListGrid grid)
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
public static String getSortSpec(com.smartgwt.client.data.SortSpecifier[] sortSpecifiers)
-
getPageSizeFromSpec
public static Integer getPageSizeFromSpec(String spec)
Gets the page size from the layout specification, the format is: |pageSize|gridLayout- Parameters:
spec
- layout specification- Returns:
- the page size
-
-