Package com.extjs.gxt.ui.client.data

Examples of com.extjs.gxt.ui.client.data.BasePagingLoadConfig


  protected PagingLoadConfig getParams(String query) {
    PagingLoadConfig config = null;
    if (store.getLoader() instanceof BaseLoader<?> && ((BaseLoader<?>) store.getLoader()).isReuseLoadConfig()) {
      config = (PagingLoadConfig) ((BaseLoader<?>) store.getLoader()).getLastConfig();
    } else {
      config = new BasePagingLoadConfig();
    }
    config.setLimit(pageSize);
    config.setOffset(0);
    config.set("query", query);
    return config;
View Full Code Here


    final PagingLoader<PagingLoadResult<ModelData>> loader = new BasePagingLoader<PagingLoadResult<ModelData>>(proxy,
        reader);

    loader.addListener(Loader.BeforeLoad, new Listener<LoadEvent>() {
      public void handleEvent(LoadEvent be) {
        BasePagingLoadConfig m = be.<BasePagingLoadConfig> getConfig();
        m.set("start", m.get("offset"));
        m.set("ext", "js");
        m.set("lightWeight", true);
        m.set("sort", (m.get("sortField") == null) ? "" : m.get("sortField"));
        m.set("dir", (m.get("sortDir") == null || (m.get("sortDir") != null && m.<SortDir> get("sortDir").equals(
            SortDir.NONE))) ? "" : m.get("sortDir"));

      }
    });
    loader.setSortDir(SortDir.DESC);
    loader.setSortField("lastpost");
View Full Code Here

    final PagingLoader<PagingLoadResult<ModelData>> loader = new BasePagingLoader<PagingLoadResult<ModelData>>(proxy,
        reader);

    loader.addListener(Loader.BeforeLoad, new Listener<LoadEvent>() {
      public void handleEvent(LoadEvent be) {
        BasePagingLoadConfig m = be.<BasePagingLoadConfig> getConfig();
        m.set("start", m.get("offset"));
        m.set("ext", "js");
        m.set("lightWeight", true);
        m.set("sort", (m.get("sortField") == null) ? "" : m.get("sortField"));
        m.set("dir", (m.get("sortDir") == null || (m.get("sortDir") != null && m.<SortDir> get("sortDir").equals(
            SortDir.NONE))) ? "" : m.get("sortDir"));

      }
    });
    loader.setSortDir(SortDir.DESC);
    loader.setSortField("lastpost");
View Full Code Here

    final Grid<Post> grid = new Grid<Post>(store, cm);
    grid.setStateId("pagingGridExample");
    grid.setStateful(true);
    grid.addListener(Events.Attach, new Listener<GridEvent<Post>>() {
      public void handleEvent(GridEvent<Post> be) {
        PagingLoadConfig config = new BasePagingLoadConfig();
        config.setOffset(0);
        config.setLimit(50);
       
        Map<String, Object> state = grid.getState();
        if (state.containsKey("offset")) {
          int offset = (Integer)state.get("offset");
          int limit = (Integer)state.get("limit");
          config.setOffset(offset);
          config.setLimit(limit);
        }
        if (state.containsKey("sortField")) {
          config.setSortField((String)state.get("sortField"));
          config.setSortDir(SortDir.valueOf((String)state.get("sortDir")));
        }
        loader.load(config);
      }
    });
    grid.setLoadMask(true);
View Full Code Here

    // loader
    final PagingLoader<PagingLoadResult<ModelData>> loader = new BasePagingLoader<PagingLoadResult<ModelData>>(proxy) {
      @Override
      protected Object newLoadConfig() {
        BasePagingLoadConfig config = new BaseFilterPagingLoadConfig();
        return config;
      }

    };
    loader.setRemoteSort(true);
View Full Code Here

  protected PagingLoadConfig getParams(String query) {
    PagingLoadConfig config = null;
    if (store.getLoader() instanceof BaseLoader<?> && ((BaseLoader<?>) store.getLoader()).isReuseLoadConfig()) {
      config = (PagingLoadConfig) ((BaseLoader<?>) store.getLoader()).getLastConfig();
    } else {
      config = new BasePagingLoadConfig();
    }
    config.setLimit(pageSize);
    config.setOffset(0);
    config.set("query", query);
    return config;
View Full Code Here

  protected PagingLoadConfig getParams(String query) {
    PagingLoadConfig config = null;
    if (store.getLoader() instanceof BaseLoader<?> && ((BaseLoader<?>) store.getLoader()).isReuseLoadConfig()) {
      config = (PagingLoadConfig) ((BaseLoader<?>) store.getLoader()).getLastConfig();
    } else {
      config = new BasePagingLoadConfig();
    }
    config.setLimit(pageSize);
    config.setOffset(0);
    config.set("query", query);
    return config;
View Full Code Here

  protected El getFocusEl() {
    return input;
  }

  protected PagingLoadConfig getParams(String query) {
    BasePagingLoadConfig config = new BasePagingLoadConfig();
    config.setLimit(pageSize);
    config.setOffset(0);
    config.getParams().put("query", query);
    return config;
  }
View Full Code Here

  protected PagingLoadConfig getParams(String query) {
    PagingLoadConfig config = null;
    if (store.getLoader() instanceof BaseLoader<?> && ((BaseLoader<?>) store.getLoader()).isReuseLoadConfig()) {
      config = (PagingLoadConfig) ((BaseLoader<?>) store.getLoader()).getLastConfig();
    } else {
      config = new BasePagingLoadConfig();
    }
    config.setLimit(pageSize);
    config.setOffset(0);
    config.set("query", query);
    return config;
View Full Code Here

  protected El getFocusEl() {
    return input;
  }

  protected PagingLoadConfig getParams(String query) {
    BasePagingLoadConfig config = new BasePagingLoadConfig();
    config.setLimit(pageSize);
    config.setOffset(0);
    config.set("query", query);
    return config;
  }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.data.BasePagingLoadConfig

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.