Package org.opencustomer.framework.webapp.util.html

Examples of org.opencustomer.framework.webapp.util.html.Pagination


        // ist dieses Tag in einem Formular?
        if (pageContext.getAttribute(Constants.FORM_KEY, PageContext.REQUEST_SCOPE) == null)
            throw new JspException("element only allowed in forms");

        Pagination pagination = (Pagination) TagUtils.getInstance().lookup(pageContext, name, property, scope);

        long pages = 0;
        long pageNr = 0;

        if (pagination != null) {
            pages = pagination.getCount() / pagination.getPage().getStep();
            if ((pagination.getCount() % pagination.getPage().getStep()) > 0)
                pages++;
            pageNr = pagination.getPage().getPage();
        }

        if (pages > 1) {
            if("true".equalsIgnoreCase(properties.getProperty("simpleType"))) {
                for (int i = 1; i <= pages; i++) {
View Full Code Here


    public int doEndTag() throws JspException {
        StringBuffer results = new StringBuffer();

        HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

        Pagination pagination = (Pagination) TagUtils.getInstance().lookup(pageContext, name, property, scope);

        long to = 0;
        long from = 0;
        long off = 0;

        if (pagination != null) {
            to = pagination.getPage().getLastEntry();
            from = pagination.getPage().getFirstEntry();
            off = pagination.getCount();
        }

        if (to > off)
            to = off;
        if (from > off)
View Full Code Here

TOP

Related Classes of org.opencustomer.framework.webapp.util.html.Pagination

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.