Examples of PageList


Examples of org.exoplatform.commons.utils.PageList

         lastQuery_ = new Query<Page>(null, null, null, null, Page.class);
      }
      virtualList.dataBind(new PageQueryAccessList(lastQuery_, 10));

      UIRepeater repeater = (UIRepeater)virtualList.getDataFeed();
      PageList datasource = repeater.getDataSource();

      if (datasource.getAvailable() > 0)
      {
         return true;
      }
      else
      {
View Full Code Here

Examples of org.hyperic.sigar.pager.PageList

    public void performPaging(PageFetcher fetcher, PageControl control)
        throws PageFetchException
    {
        PrintStream out;
        PageList data;
        boolean lineNumberMode;

        // Don't know how to handle this case
        if (control.getPagesize() == 0) {
            return;
        }

        lineNumberMode = false;
        out            = getOutStream();

        if (isRedirected()) {
            control.setPagesize(PageControl.SIZE_UNLIMITED);
        }

        data = fetcher.getPage((PageControl)control.clone());
        printPage(out, data, control.getPageEntityIndex() + 1,
                  lineNumberMode);

        if (control.getPagesize() == PageControl.SIZE_UNLIMITED ||
            data.size() < control.getPagesize())
        {
            return;
        }

        while (true) {
            boolean printPage = false;
            String cmd;
            int totalPages;

            totalPages = getNumPages(control, data);

            try {
                cmd = getInput("--More-- (Page " +
                               (control.getPagenum() + 1) + " of " +
                               totalPages + ")", false);
            } catch(IOException exc) {
                out.println();
                break;
            }

            if (cmd == null || (cmd = cmd.trim()).length() == 0) {
                printPage = true;
                control.setPagenum(control.getPagenum() + 1);
            }
            else if (cmd.equals("q")) {
                break;
            }
            else if (cmd.equals("b")) {
                printPage = true;
                if (control.getPagenum() > 0) {
                    control.setPagenum(control.getPagenum() - 1);
                }
            }
            else if (cmd.equals("l")) {
                lineNumberMode = !lineNumberMode;
                printPage = true;
            }
            else if (cmd.equals("?")) {
                out.println("  'b'        - Scroll back one page");
                out.println("  'l'        - Toggle line number mode");
                out.println("  'q'        - Quit paging");
                out.println("  '<number>' - Jump to the specified page #");
                out.println("  '<enter>'  - Scroll forward one page");
            }
            else {
                int newPageNo;

                try {
                    newPageNo = Integer.parseInt(cmd);
                } catch(NumberFormatException exc) {
                    out.println("Unknown command '" + cmd + "' " +
                                " type '?' for paging help");
                    continue;
                }
               
                if (newPageNo < 1 || newPageNo > totalPages) {
                    out.println(newPageNo + " out of range (must be " +
                                "1 to " + totalPages + ")");
                }
                else {
                    control.setPagenum(newPageNo - 1);
                    printPage = true;
                }
            }

            if (printPage) {
                data = fetcher.getPage((PageControl)control.clone());
                printPage(out, data, control.getPageEntityIndex() + 1,
                          lineNumberMode);

                // Check to see if we printed the last of the data
                if (data.size() < control.getPagesize()) {
                    break;
                }
            }
        }
    }
View Full Code Here

Examples of org.jeecgframework.core.common.hibernate.qbc.PageList

            curPageNO, pageSize, cq.getMap());
      }
    } else {
      pageSize = allCounts;
    }
    return new PageList(criteria.list(), toolBar, offset, curPageNO,
        allCounts);
  }
View Full Code Here

Examples of org.rhq.core.domain.util.PageList

     */
    @SuppressWarnings("unchecked")
    public static PageList createPaginationFilter(EntityManager entityManager, Collection collection,
        PageControl pageControl) {
        if (collection == null) {
            return new PageList(pageControl);
        }

        String filter = "";
        if (pageControl.getPrimarySortColumn() != null) {
            PageOrdering order = (pageControl.getPrimarySortOrder() == null) ? PageOrdering.ASC : pageControl
View Full Code Here

Examples of org.rhq.core.domain.util.PageList

        HttpServletRequest request, HttpServletResponse response) throws Exception {
        Log log = LogFactory.getLog(ListAction.class.getName());
        log.trace("getting all roles");

        PageControl pc = WebUtility.getPageControl(request);
        PageList roles = LookupUtil.getRoleManager().findRoles(pc);
        request.setAttribute(Constants.ALL_ROLES_ATTR, roles);

        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.