Package com.sencha.gxt.data.shared

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


    sortInfo.clear();
    for (SortInfo i : info) {
      if (i instanceof SortInfoBean) {
        sortInfo.add((SortInfoBean) i);
      } else {
        sortInfo.add(new SortInfoBean(i.getSortField(), i.getSortDir()));
      }
    }
  }
View Full Code Here


      }

    } else {
      ValueProvider<? super M, ?> vp = column.getValueProvider();

      SortInfoBean bean = new SortInfoBean(vp, sortDir);

      if (sortDir == null && sortState != null && vp.getPath().equals(sortState.getSortField())) {
        bean.setSortDir(sortState.getSortDir() == SortDir.ASC ? SortDir.DESC : SortDir.ASC);

      } else if (sortDir == null) {
        bean.setSortDir(SortDir.ASC);
      }

      grid.getLoader().clearSortInfo();
      grid.getLoader().addSortInfo(bean);
      grid.getLoader().load();
View Full Code Here

                  || storeSortInfo.getDirection() != info.getDirection()) {
                int index = cm.indexOf(config);
                if (index != -1) {
                  updateSortIcon(index, info.getDirection());
                }
                grid.fireEvent(new SortChangeEvent(new SortInfoBean(info.getPath(), info.getDirection())));
              }

            }
          }
          storeSortInfo = info;
View Full Code Here

    cacheStore.clear();
    ColumnConfig<M, ?> column = cm.getColumn(colIndex);

    ValueProvider<? super M, ?> vp = column.getValueProvider();

    SortInfoBean bean = new SortInfoBean(vp, sortDir);

    if (sortDir == null && sortState != null && vp.getPath().equals(sortState.getSortField())) {
      bean.setSortDir(sortState.getSortDir() == SortDir.ASC ? SortDir.DESC : SortDir.ASC);

    } else if (sortDir == null) {
      bean.setSortDir(SortDir.ASC);
    }

    grid.getLoader().clearSortInfo();
    grid.getLoader().addSortInfo(bean);
    maskView();
View Full Code Here

      } else {
        assert lastSort != null;
        ValueProvider<? super M, ?> vp = column.getValueProvider();
        grid.getLoader().clearSortInfo();
        grid.getLoader().addSortInfo(0, lastSort);
        grid.getLoader().addSortInfo(1, new SortInfoBean(vp, sortDir));
        grid.getLoader().load();
      }

    } else {
      super.doSort(colIndex, sortDir);
View Full Code Here

      if (column != null) {
        if (grid.getLoader() == null || !grid.getLoader().isRemoteSort()) {
          lastStoreSort = createStoreSortInfo(column, SortDir.ASC);
          ds.addSortInfo(0, lastStoreSort);// this triggers the sort
        } else {
          lastSort = new SortInfoBean(column.getValueProvider(), SortDir.ASC);
          grid.getLoader().addSortInfo(0, lastSort);
          grid.getLoader().load();
        }
      } else {// new column == null
        lastStoreSort = null;
View Full Code Here

      }

    } else {
      ValueProvider<? super M, ?> vp = column.getValueProvider();

      SortInfoBean bean = new SortInfoBean(vp, sortDir);

      if (sortDir == null && sortState != null && vp.getPath().equals(sortState.getSortField())) {
        bean.setSortDir(sortState.getSortDir() == SortDir.ASC ? SortDir.DESC : SortDir.ASC);

      } else if (sortDir == null) {
        bean.setSortDir(SortDir.ASC);
      }

      grid.getLoader().clearSortInfo();
      grid.getLoader().addSortInfo(bean);
      grid.getLoader().load();
View Full Code Here

                  || storeSortInfo.getDirection() != info.getDirection()) {
                int index = cm.indexOf(config);
                if (index != -1) {
                  updateSortIcon(index, info.getDirection());
                }
                grid.fireEvent(new SortChangeEvent(new SortInfoBean(info.getPath(), info.getDirection())));
              }

            }
          }
          storeSortInfo = info;
View Full Code Here

      if (column != null) {
        if (grid.getLoader() == null || !grid.getLoader().isRemoteSort()) {
          lastStoreSort = createStoreSortInfo(column, SortDir.ASC);
          ds.addSortInfo(0, lastStoreSort);// this triggers the sort
        } else {
          lastSort = new SortInfoBean(column.getValueProvider(), SortDir.ASC);
          grid.getLoader().addSortInfo(0, lastSort);
          grid.getLoader().load();
        }
      } else {// new column == null
        lastStoreSort = null;
View Full Code Here

      } else {
        assert lastSort != null;
        ValueProvider<? super M, ?> vp = column.getValueProvider();
        grid.getLoader().clearSortInfo();
        grid.getLoader().addSortInfo(0, lastSort);
        grid.getLoader().addSortInfo(1, new SortInfoBean(vp, sortDir));
        grid.getLoader().load();
      }

    } else {
      super.doSort(colIndex, sortDir);
View Full Code Here

TOP

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

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.