Class DocumentGridUtil


  • public class DocumentGridUtil
    extends Object
    Utility methods for documents grids
    Since:
    7.0
    Author:
    Marco Meschieri - LogicalDOC
    • Method Detail

      • getIds

        public static long[] getIds​(com.smartgwt.client.data.Record[] records)
      • getIdsAsLong

        public static Long[] getIdsAsLong​(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 rec)
      • fromDocument

        public static com.smartgwt.client.widgets.grid.ListGridRecord fromDocument​(GUIDocument doc)
      • updateRecord

        public static void updateRecord​(GUIDocument doc,
                                        com.smartgwt.client.data.Record rec)
      • 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: |folderPageSize|pageSize|gridLayout
        Parameters:
        spec - layout specification
        Returns:
        the page size
      • getFolderPageSizeFromSpec

        public static Integer getFolderPageSizeFromSpec​(String spec)
        Gets the page size from the layout specification, the format is: |folderPageSize|pageSize|gridLayout
        Parameters:
        spec - layout specification
        Returns:
        the page size
      • getGridLayoutFromSpec

        public static String getGridLayoutFromSpec​(String spec)
        Gets the grid layout specification, the format is: |folderPageSize|pageSize|gridLayout or simply gridLayout
        Parameters:
        spec - layout specification
        Returns:
        grid definition