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

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


    // Se agrega un listener necesario para recargar la informacion de la
    // grilla cuando se introduce algun filtro
    addListener(Events.Attach, new Listener<GridEvent>() {
      public void handleEvent(GridEvent be) {
        PagingLoadConfig config = new BaseFilterPagingLoadConfig();
        config.setOffset(0);
        config.setLimit(pageSize);
        loader.load(config);
      }
    });

    // Habilitamos para que se muestre una mascara mientras se esta cargando
View Full Code Here


  protected El getFocusEl() {
    return input;
  }

  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

      }
    }

    if (grid != null && grid.isStateful() && ds != null && ds.getLoadConfig() != null
        && ds.getLoadConfig() instanceof PagingLoadConfig) {
      PagingLoadConfig config = (PagingLoadConfig) ds.getLoadConfig();
      Map<String, Object> state = grid.getState();
      state.put("offset", config.getOffset());
      state.put("limit", config.getLimit());
      grid.saveState();
    }

    constrainFocusElement();
  }
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

  protected El getFocusEl() {
    return input;
  }

  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) {
    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

      }
    }

    if (grid != null && grid.isStateful() && ds != null && ds.getLoadConfig() != null
        && ds.getLoadConfig() instanceof PagingLoadConfig) {
      PagingLoadConfig config = (PagingLoadConfig) ds.getLoadConfig();
      Map<String, Object> state = grid.getState();
      state.put("offset", config.getOffset());
      state.put("limit", config.getLimit());
      grid.saveState();
    }
  }
View Full Code Here

        grid.mask();
      }
    }

    if (grid.isStateful() && ds.getLoadConfig() != null && ds.getLoadConfig() instanceof PagingLoadConfig) {
      PagingLoadConfig config = (PagingLoadConfig) ds.getLoadConfig();
      Map<String, Object> state = grid.getState();
      state.put("offset", config.getOffset());
      state.put("limit", config.getLimit());
      grid.saveState();
    }
  }
View Full Code Here

      }
    }

    if (grid != null && grid.isStateful() && ds != null && ds.getLoadConfig() != null
        && ds.getLoadConfig() instanceof PagingLoadConfig) {
      PagingLoadConfig config = (PagingLoadConfig) ds.getLoadConfig();
      Map<String, Object> state = grid.getState();
      state.put("offset", config.getOffset());
      state.put("limit", config.getLimit());
      grid.saveState();
    }
  }
View Full Code Here

  protected El getFocusEl() {
    return input;
  }

  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

TOP

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

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.