Class GridUtil

java.lang.Object
com.logicaldoc.gui.common.client.util.GridUtil

public class GridUtil extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Listener to inject code at the end of a grid scroll
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
     
    static void
    exportCSV(com.smartgwt.client.widgets.grid.ListGrid listGrid, boolean allFields)
    Exports into the CSV format the content of a ListGrid.
    static List<Long>
    getIds(com.smartgwt.client.widgets.grid.ListGridRecord[] records)
    Collects all the IDs in an array of recods, the field 'id' is used.
    static void
    print(com.smartgwt.client.widgets.grid.ListGrid listGrid)
    Prints a grid
    static void
    scrollDownGrid(com.smartgwt.client.widgets.grid.ListGrid listGrid, GridUtil.EndScrollListener listener)
    Scrolls the grid all down
    static void
    scrollGrid(com.smartgwt.client.widgets.grid.ListGrid listGrid, GridUtil.EndScrollListener listener)
    Scrolls the grid trying to display all the rec and fetch all the data

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GridUtil

      public GridUtil()
  • Method Details

    • scrollGrid

      public static void scrollGrid(com.smartgwt.client.widgets.grid.ListGrid listGrid, GridUtil.EndScrollListener listener)
      Scrolls the grid trying to display all the rec and fetch all the data
      Parameters:
      listGrid - the grid to process
      listener - optional listener inoked at the end of the scroll
    • scrollDownGrid

      public static void scrollDownGrid(com.smartgwt.client.widgets.grid.ListGrid listGrid, GridUtil.EndScrollListener listener)
      Scrolls the grid all down
      Parameters:
      listGrid - the grid to process
      listener - optional listener inoked at the end of the scroll
    • print

      public static void print(com.smartgwt.client.widgets.grid.ListGrid listGrid)
      Prints a grid
      Parameters:
      listGrid - Grid containing the data
    • exportCSV

      public static void exportCSV(com.smartgwt.client.widgets.grid.ListGrid listGrid, boolean allFields)
      Exports into the CSV format the content of a ListGrid.
      Parameters:
      listGrid - Grid containing the data
      allFields - True if all the fields(even if hidden) have to be extracted
    • getIds

      public static List<Long> getIds(com.smartgwt.client.widgets.grid.ListGridRecord[] records)
      Collects all the IDs in an array of recods, the field 'id' is used.
      Parameters:
      records - the records to list
      Returns:
      the collection of extracted ids
    • exportAsCSV

      public static void exportAsCSV(String content)