Search in sources :

Example 6 with ListStore

use of com.extjs.gxt.ui.client.store.ListStore 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

ListStore (com.extjs.gxt.ui.client.store.ListStore)6 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)2 SafeHtmlBuilder (com.google.gwt.safehtml.shared.SafeHtmlBuilder)2 ArrayList (java.util.ArrayList)2 ProjectDTO (org.activityinfo.legacy.shared.model.ProjectDTO)2 Loader (com.extjs.gxt.ui.client.data.Loader)1 ModelData (com.extjs.gxt.ui.client.data.ModelData)1 PagingLoader (com.extjs.gxt.ui.client.data.PagingLoader)1 BorderLayout (com.extjs.gxt.ui.client.widget.layout.BorderLayout)1 BorderLayoutData (com.extjs.gxt.ui.client.widget.layout.BorderLayoutData)1 FitLayout (com.extjs.gxt.ui.client.widget.layout.FitLayout)1 RowData (com.extjs.gxt.ui.client.widget.layout.RowData)1 PagingToolBar (com.extjs.gxt.ui.client.widget.toolbar.PagingToolBar)1 LocationDTO (org.activityinfo.legacy.shared.model.LocationDTO)1 PartnerDTO (org.activityinfo.legacy.shared.model.PartnerDTO)1 TargetDTO (org.activityinfo.legacy.shared.model.TargetDTO)1 TimePeriodColumn (org.activityinfo.ui.client.page.common.columns.TimePeriodColumn)1