Search in sources :

Example 1 with PagingLoader

use of com.extjs.gxt.ui.client.data.PagingLoader in project activityinfo by bedatadriven.

the class AbstractGridView method init.

public void init(final P presenter, Store store) {
    this.presenter = presenter;
    createToolBar();
    grid = createGridAndAddToContainer(store);
    initGridListeners(grid);
    if (store instanceof ListStore) {
        Loader loader = ((ListStore) store).getLoader();
        if (loader instanceof PagingLoader) {
            pagingBar = new PagingToolBar(presenter.getPageSize());
            setBottomComponent(pagingBar);
            pagingBar.bind((PagingLoader<?>) loader);
        }
    }
    /**
     * In some cases, there is async call before the user inerface can be
     * loaded. So we have to make sure our new components are rendered
     */
    if (this.isRendered()) {
        this.layout();
    }
}
Also used : ListStore(com.extjs.gxt.ui.client.store.ListStore) PagingToolBar(com.extjs.gxt.ui.client.widget.toolbar.PagingToolBar) Loader(com.extjs.gxt.ui.client.data.Loader) PagingLoader(com.extjs.gxt.ui.client.data.PagingLoader) PagingLoader(com.extjs.gxt.ui.client.data.PagingLoader)

Aggregations

Loader (com.extjs.gxt.ui.client.data.Loader)1 PagingLoader (com.extjs.gxt.ui.client.data.PagingLoader)1 ListStore (com.extjs.gxt.ui.client.store.ListStore)1 PagingToolBar (com.extjs.gxt.ui.client.widget.toolbar.PagingToolBar)1