Package com.sencha.gxt.data.shared

Examples of com.sencha.gxt.data.shared.SortInfo


   */
  protected List<SortInfo> createRequestSortInfo(RequestContext request, List<? extends SortInfo> original) {
    List<SortInfo> sortInfo = new ArrayList<SortInfo>();
   
    for (int i = 0; i < original.size(); i++) {
      SortInfo originalSortInfo = original.get(i);
      SortInfo reqSortInfo = request.create(SortInfo.class);
      reqSortInfo.setSortDir(originalSortInfo.getSortDir());
      reqSortInfo.setSortField(originalSortInfo.getSortField());
      sortInfo.add(reqSortInfo);
    }
   
    return sortInfo;
  }
View Full Code Here


      }
    } else {
      List<? extends SortInfo> infos = grid.getLoader().getSortInfo();
      if (infos.size() > 0) {
        SortInfo info = infos.get(0);
        String p = info.getSortField();
        if (p != null && !"".equals(p)) {
          ColumnConfig<M, ?> config = cm.findColumnConfig(p);
          if (config != null) {
            if (sortState == null || (!sortState.getSortField().equals(p))
                || sortState.getSortDir() != info.getSortDir()) {
              int index = cm.indexOf(config);
              if (index != -1) {
                updateSortIcon(index, info.getSortDir());
              }
              grid.fireEvent(new SortChangeEvent(info));
            }
          }
          sortState = info;
View Full Code Here

    if (container instanceof Grid) {
      Grid<M> grid = (Grid<M>) container;
      if (grid.getView().isRemoteSort()) {
        List<? extends SortInfo> sortInfos = grid.getLoader().getSortInfo();
        if (sortInfos.size() > 0) {
          SortInfo sortInfo = sortInfos.get(0);
          String sortField = sortInfo.getSortField();
          if (sortField != null && !"".equals(sortField)) {
            ColumnConfig<M, ?> column = cm.findColumnConfig(sortField);
            if (column != null) {
              int index = cm.indexOf(column);
              if (index != -1) {
                updateSortIcon(index, sortInfo.getSortDir());
              }
            }
          }
        }
      } else {
        StoreSortInfo<M> sortInfo = grid.getView().getSortState();
        if (sortInfo != null && sortInfo.getValueProvider() != null) {
          ColumnConfig<M, ?> column = grid.getColumnModel().findColumnConfig(sortInfo.getPath());
          if (column != null) {
            updateSortIcon(grid.getColumnModel().indexOf(column), sortInfo.getDirection());
          }
        }
      }
    }
View Full Code Here

      }
    } else {
      List<? extends SortInfo> infos = grid.getLoader().getSortInfo();
      if (infos.size() > 0) {
        SortInfo info = infos.get(0);
        String p = info.getSortField();
        if (p != null && !"".equals(p)) {
          ColumnConfig<M, ?> config = cm.findColumnConfig(p);
          if (config != null) {
            if (sortState == null || (!sortState.getSortField().equals(p))
                || sortState.getSortDir() != info.getSortDir()) {
              int index = cm.indexOf(config);
              if (index != -1) {
                updateSortIcon(index, info.getSortDir());
              }
              grid.fireEvent(new SortChangeEvent(info));
            }
          }
          sortState = info;
View Full Code Here

   */
  protected List<SortInfo> createRequestSortInfo(RequestContext request, List<? extends SortInfo> original) {
    List<SortInfo> sortInfo = new ArrayList<SortInfo>();
   
    for (int i = 0; i < original.size(); i++) {
      SortInfo originalSortInfo = original.get(i);
      SortInfo reqSortInfo = request.create(SortInfo.class);
      reqSortInfo.setSortDir(originalSortInfo.getSortDir());
      reqSortInfo.setSortField(originalSortInfo.getSortField());
      sortInfo.add(reqSortInfo);
    }
   
    return sortInfo;
  }
View Full Code Here

TOP

Related Classes of com.sencha.gxt.data.shared.SortInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.