0

I know I can set current page of my search container's pagination using an URL parameter (e.g. &cur=2).

However, I want to do this from inside the JSP: just like I can set the delta in <liferay-ui:search-container delta=5>.

Is this possible? Where is the parameter cur from the URL passed to? I've searched sources to no avail.

John Doe
  • 191
  • 2
  • 15

1 Answers1

0

Yes, you can set cur in search container as follow:

<liferay-ui:search-container>

    Integer cur = (Integer)request.getAttribute("cur");        
        if(cur == null){
            cur = 1;
        }

......

    <%        portletURL.setParameter("cur", String.valueOf(cur));  
      searchContainer.setIteratorURL(portletURL);    %>

</liferay-ui:search-container>
wikimix
  • 457
  • 6
  • 23