Package com.gwtext.client.widgets

Examples of com.gwtext.client.widgets.PagingToolbar


    this.gridPanel.setLoadMask( true );
    this.gridPanel.setStore( getMessageStore() );
    this.gridPanel.setEnableDragDrop( true );
    this.gridPanel.setDdGroup( "messagesDDGroup" );

    this.pagingToolbar = new PagingToolbar( getMessageStore() );
    this.pagingToolbar.setPageSize( GWTSessionManager.get().getPreferences().getPageCount() );
    this.pagingToolbar.setDisplayInfo( true );
    this.pagingToolbar.setDisplayMsg( TextProvider.get().grid_messages_count().replace( '[', '{' ).replace( ']',
        '}' ) );
    this.pagingToolbar.setEmptyMsg( TextProvider.get().grid_messages_no_messages() );
View Full Code Here


    public static final String USER_NAME_KEY = "userName";
    public static final String TOP_LEVEL_KEY = "topLevel";
    public static final String SEARCH_TEXT_KEY = "searchText";

    public static PagingToolbar getNewPagingToolbar(Store st, int pageSize) {
        final PagingToolbar pagingToolbar = new PagingToolbar(st);
        pagingToolbar.setPageSize(pageSize);
        pagingToolbar.setDisplayInfo(true);
        pagingToolbar.setDisplayMsg("Displaying records {0} - {1} of {2}");
        pagingToolbar.setEmptyMsg("No records to display");

        TextField pageSizeField = new TextField(Integer.toString(pageSize), "pageSize");
        pageSizeField.setWidth(40);
        pageSizeField.setSelectOnFocus(true);
        pageSizeField.addListener(new TextFieldListenerAdapter() {
            @Override
            public void onSpecialKey(Field field, EventObject e) {
                if (e.getKey() == EventObject.ENTER) {
                    try {
                        int pageSize = Integer.parseInt(field.getValueAsString());
                        if(pageSize > 0) {
                            pagingToolbar.setPageSize(pageSize);
                        }
                    } catch (NumberFormatException nfe) {
                        GWT.log("Invalid number in Pagination", nfe);
                    }
                }
            }
        });

        pagingToolbar.doOnRender(new Function() {
            public void execute() {
                try {
                    pagingToolbar.getRefreshButton().hide();
                } catch(IllegalStateException ise) {
                    GWT.log("PagingToolbar.getRefreshButton() called before doOnRender()", ise);
                }
            }
        });

        ToolTip toolTip = new ToolTip("Enter page size");
        toolTip.applyTo(pageSizeField);

        pagingToolbar.addField(pageSizeField);

        return pagingToolbar;
    }
View Full Code Here

        });

        store = new Store(proxy, reader);
        setStore(store);

        PagingToolbar pToolbar = PaginationUtil.getNewPagingToolbar(store, 20);
        setBottomToolbar(pToolbar);

        addSearchToolbar();

        setStripeRows(true);
View Full Code Here

        proxy = new WatchedEntitiesProxyImpl();
        store.setDataProxy(proxy);
        store.setSortInfo(new SortState("author", SortDir.ASC));
        store.setGroupField("entity");

        PagingToolbar pToolbar = PaginationUtil.getNewPagingToolbar(store, INITIAL_PAGE_SIZE);
        pToolbar.setPageSize(INITIAL_PAGE_SIZE);

        setBottomToolbar(pToolbar);

        setAutoWidth(true);
        setStripeRows(true);
View Full Code Here

        ProjectId projectId = getProjectId();
        proxy.resetParams();
        proxy.setProjectId(projectId);
        proxy.setEntityName(entityName);

        PagingToolbar pToolbar = (PagingToolbar) changesGrid.getBottomToolbar();
        store.load(0, pToolbar.getPageSize());
    }
View Full Code Here

    ArrayReader reader = new ArrayReader(recordDef);
    proxy = new ChangesProxyImpl();
    store = new Store(proxy, reader);

    PagingToolbar pToolbar = PaginationUtil.getNewPagingToolbar(store, 20);

    changesGrid.setBottomToolbar(pToolbar);

    changesGrid.setStore(store);
View Full Code Here

        ArrayReader reader = new ArrayReader(recordDef);
        proxy = new ChangesProxyImpl();
        store = new Store(proxy, reader);

        PagingToolbar pToolbar = PaginationUtil.getNewPagingToolbar(store, 20);
        this.setBottomToolbar(pToolbar);

        setStore(store);

        if (getStore() == null) {
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.PagingToolbar

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.