Package org.openfaces.component.table

Examples of org.openfaces.component.table.DataTablePaginatorAction


        DataTablePaginatorAction action = new SelectPageActionInInput(newPageIndex);
        action.execute(table);
    }

    public static void executePaginationAction(FacesContext context, DataTable table, String actionStr) {
        DataTablePaginatorAction action;
        if ("selectNextPage".equals(actionStr))
            action = new SelectNextPageAction();
        else if ("selectPrevPage".equals(actionStr))
            action = new SelectPreviousPageAction();
        else if ("selectFirstPage".equals(actionStr))
            action = new SelectFirstPageAction();
        else if ("selectLastPage".equals(actionStr))
            action = new SelectLastPageAction();
        else if (actionStr.startsWith(SELECT_PAGE_NO_COMMAND)) {
            String pageNoStr = actionStr.substring(SELECT_PAGE_NO_COMMAND.length());
            int pageNo;
            try {
                pageNo = Integer.parseInt(pageNoStr);
            } catch (NumberFormatException e) {
                return;
            }
            action = new SelectPageNoAction(pageNo);
        } else {
            Log.log(context, "Unknown DataTablePaginator action came from client: " + actionStr);
            return;
        }

        action.execute(table);
    }
View Full Code Here



    }

    public static void executePaginationActionInInput(FacesContext context, DataTable table, int newPageIndex) {
        DataTablePaginatorAction action = new SelectPageActionInInput(newPageIndex);
        action.execute(table);
    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.table.DataTablePaginatorAction

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.