Package org.displaytag.pagination

Examples of org.displaytag.pagination.SmartListHelper


     * ToString() test.
     */
    @Test
    public void testSmartListHelper()
    {
        checkToString(new SmartListHelper(new ArrayList<Object>(), 100, 10, TableProperties.getInstance(null), false));
    }
View Full Code Here


        int pageOffset = this.offset;
        // If they have asked for just a page of the data, then use the
        // SmartListHelper to figure out what page they are after, etc...
        if (this.paginatedList == null && this.pagesize > 0)
        {
            this.listHelper = new SmartListHelper(fullList, (this.partialList)
                ? ((Integer) size).intValue()
                : fullList.size(), this.pagesize, this.properties, this.partialList);
            this.listHelper.setCurrentPage(this.pageNumber);
            pageOffset = this.listHelper.getFirstIndexForCurrentPage();
            fullList = this.listHelper.getListForCurrentPage();
View Full Code Here

            rawData.add(i);
            data.add(new Row(i, i));
        }

        TableProperties props = TableProperties.getInstance(null);
        SmartListHelper helper = new SmartListHelper(data, data.size(), 10, props, false);
        helper.setCurrentPage(1);
        List fullList = helper.getListForCurrentPage();

        TableModel model = new TableModel(props, "", null);
        model.setRowListPage(fullList);
        model.setPageOffset(helper.getFirstIndexForCurrentPage());

        MultilevelTotalTableDecorator decorator = new MultilevelTotalTableDecorator();
        decorator.init(null, rawData, model);
        model.setTableDecorator(decorator);
View Full Code Here

            rawData.add(i);
            data.add(new Row(i, i));
        }

        TableProperties props = TableProperties.getInstance(null);
        SmartListHelper helper = new SmartListHelper(data, data.size(), 5, props, false);
        helper.setCurrentPage(1);
        List fullList = helper.getListForCurrentPage();

        TableModel model = new TableModel(props, "", null);
        model.setRowListPage(fullList);
        model.setPageOffset(helper.getFirstIndexForCurrentPage());

        MultilevelTotalTableDecorator decorator = new MultilevelTotalTableDecorator();
        decorator.init(null, rawData, model);
        model.setTableDecorator(decorator);
View Full Code Here

            rawData.add(i);
            data.add(new Row(i, i));
        }

        TableProperties props = TableProperties.getInstance(null);
        SmartListHelper helper = new SmartListHelper(data, data.size(), 5, props, false);
        helper.setCurrentPage(2);
        List fullList = helper.getListForCurrentPage();

        TableModel model = new TableModel(props, "", null);
        model.setRowListPage(fullList);
        model.setPageOffset(helper.getFirstIndexForCurrentPage());

        MultilevelTotalTableDecorator decorator = new MultilevelTotalTableDecorator();
        decorator.init(null, rawData, model);
        model.setTableDecorator(decorator);
View Full Code Here

        int pageOffset = this.offset;
        // If they have asked for just a page of the data, then use the
        // SmartListHelper to figure out what page they are after, etc...
        if (this.paginatedList == null && this.pagesize > 0)
        {
            this.listHelper = new SmartListHelper(fullList, (this.partialList) ? ((Integer) size).intValue() : fullList
                .size(), this.pagesize, this.properties, this.partialList);
            this.listHelper.setCurrentPage(this.pageNumber);
            pageOffset = this.listHelper.getFirstIndexForCurrentPage();
            fullList = this.listHelper.getListForCurrentPage();
        }
View Full Code Here

        // SmartListHelper to figure out what page they are after, etc...

        if (this.pagesize > 0)
        {

            this.listHelper = new SmartListHelper(fullList, this.pagesize, this.properties);

            this.listHelper.setCurrentPage(this.pageNumber);

            fullList = this.listHelper.getListForCurrentPage();
View Full Code Here

        int pageOffset = this.offset;
        // If they have asked for just a page of the data, then use the
        // SmartListHelper to figure out what page they are after, etc...
        if (this.paginatedList == null && this.pagesize > 0)
        {
            this.listHelper = new SmartListHelper(fullList, (this.partialList) ? ((Integer) size).intValue() : fullList
                .size(), this.pagesize, this.properties, this.partialList);
            this.listHelper.setCurrentPage(this.pageNumber);
            pageOffset = this.listHelper.getFirstIndexForCurrentPage();
            fullList = this.listHelper.getListForCurrentPage();
        }
View Full Code Here

        int pageOffset = this.offset;
        // If they have asked for just a page of the data, then use the
        // SmartListHelper to figure out what page they are after, etc...
        if (this.paginatedList == null && this.pagesize > 0) {
            this.listHelper = new SmartListHelper(fullList, (this.partialList) ? ((Integer) size).intValue() : fullList
                    .size(), this.pagesize, this.properties, this.partialList);
            this.listHelper.setCurrentPage(this.pageNumber);
            pageOffset = this.listHelper.getFirstIndexForCurrentPage();
            fullList = this.listHelper.getListForCurrentPage();
        } else if (this.paginatedList != null) {
View Full Code Here

TOP

Related Classes of org.displaytag.pagination.SmartListHelper

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.