Package org.apache.jetspeed.portal.portlets.browser

Examples of org.apache.jetspeed.portal.portlets.browser.DatabaseBrowserIterator


        // By default, only return psml pages for the current user
        String defaultSearch = PortletConfigState.getParameter(portlet, rundata, DEFAULT_SEARCH, "true");

        //Get the iterator
        DatabaseBrowserIterator windowIterator =
        (DatabaseBrowserIterator) PortletSessionState.getAttribute(portlet, rundata, PROFILE_ITERATOR);
        if (refreshFlag)
        {
            setRefreshPsmlFlag(rundata, FALSE);
            PortletSessionState.clearAttribute(portlet, rundata, PROFILE_ITERATOR);

            // Use last used search value to refresh
            Integer type = (Integer) PortletSessionState.getAttribute(portlet, rundata, LAST_SEARCH_TYPE);
            String value = (String) PortletSessionState.getAttribute(portlet, rundata, LAST_SEARCH_VALUE);

            if (type != null && value != null)
            {
                windowIterator = performSearch(rundata, portlet, type.intValue(), value);
            }

        }
        else if (windowIterator != null)
        {
            windowIterator.setTop(start);
        }
        else if (defaultSearch != null && defaultSearch.equals("true"))
        {
            windowIterator = performSearch(rundata, portlet, QueryLocator.QUERY_USER, rundata.getUser().getUserName());
        }

        if (windowIterator != null)
        {
            context.put("psml", windowIterator);
            if (start > 0)
            {
                context.put("prev", String.valueOf(prev + 1));
            }
            if (next <= windowIterator.getResultSetSize())
            {
                context.put("next", String.valueOf(next - 1));
            }

        }
View Full Code Here


        ArrayList entryType = new ArrayList();
        entryType.add("Profile");

        int size = Integer.parseInt(PortletConfigState.getParameter(portlet, rundata, PAGE_SIZE, "20"));
        DatabaseBrowserIterator windowIterator = new DatabaseBrowserIterator(entries, entryType, entryType, size);
        PortletSessionState.clearAttribute(portlet, rundata, PROFILE_ITERATOR);
        PortletSessionState.setAttribute(portlet, rundata, PROFILE_ITERATOR, windowIterator);
        PortletSessionState.setAttribute(portlet, rundata, LAST_SEARCH_TYPE, new Integer(type));
        PortletSessionState.setAttribute(portlet, rundata, LAST_SEARCH_VALUE, value);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.portal.portlets.browser.DatabaseBrowserIterator

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.