protected void onClear(StoreEvent<ModelData> se) { refresh(false); }
protected void onColumnMove(int newIndex) { boolean pScroll = preventScrollToTopOnRefresh; preventScrollToTopOnRefresh = true; refresh(true); preventScrollToTopOnRefresh = pScroll; templateAfterMove(newIndex); }
@Override public void refresh() { grid.getView().refresh(false); }
@Override public void refresh(boolean headerToo) { super.refresh(headerToo); if (headerToo) { positionLiveScroller(); } if (!preventScrollToTopOnRefresh) { // we scrolled to the top updateRows(0, false); } }
private void showEmptyText(String text) { grid.getView().setEmptyText(text); grid.getView().refresh(false); }
protected void onDataChanged(StoreEvent<ModelData> se) { refresh(false); if (grid != null && grid.isLoadMask()) { if (grid.isEnabled()) { grid.unmask(); } else { grid.mask(); } } 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(); } }
/** * Reconfigures the grid to use a different Store and Column Model. The View * will be bound to the new objects and refreshed. * * @param store the new store * @param cm the new column model */ public void reconfigure(ListStore<M> store, ColumnModel cm) { if (loadMask && rendered) { mask(GXT.MESSAGES.loadMask_msg()); } if (rendered) { view.initData(store, cm); } this.store = store; this.cm = cm; // rebind the sm setSelectionModel(sm); if (isViewReady()) { view.refresh(true); } if (loadMask && rendered) { unmask(); } fireEvent(Events.Reconfigure); }
view.refresh(true); doInitialLoad();