use of com.extjs.gxt.ui.client.data.ListLoadConfig in project activityinfo by bedatadriven.
the class AbstractGridPresenter method firePageEvent.
protected void firePageEvent(AbstractGridPageState place, LoadEvent le) {
Object config = le.getConfig();
if (config instanceof ListLoadConfig) {
place.setSortInfo(((ListLoadConfig) config).getSortInfo());
}
if (config instanceof PagingLoadConfig && place instanceof AbstractPagingGridPageState) {
int offset = ((PagingLoadConfig) config).getOffset();
((AbstractPagingGridPageState) place).setPageNum(pageFromOffset(offset));
}
eventBus.fireEvent(new NavigationEvent(NavigationHandler.NAVIGATION_AGREED, place));
}
use of com.extjs.gxt.ui.client.data.ListLoadConfig in project activityinfo by bedatadriven.
the class AbstractGridPresenter method onLoaded.
protected void onLoaded(LoadEvent le) {
Map<String, Object> stateMap = new HashMap<String, Object>();
Object config = le.getConfig();
if (config instanceof ListLoadConfig) {
SortInfo si = ((ListLoadConfig) config).getSortInfo();
stateMap.put("sortField", si.getSortField());
stateMap.put("sortDir", si.getSortDir() == Style.SortDir.ASC ? "ASC" : "DESC");
}
if (config instanceof PagingLoadConfig) {
int offset = ((PagingLoadConfig) config).getOffset();
stateMap.put("offset", offset);
}
saveState(stateMap);
}
Aggregations