liferay 6 - Pagination with several Searchcontainer -
try how implement pagination mapping several searchcontainer container page byi independent.
here 2 searchcontainer different list display. need change page in first searchcontainer , dont change page in second.(vice versa)
<aui:form action="<%= renderurl.tostring()%>" method="post" name="fm" showemptyoption="<%= true%>"> <div> <% list list = serviceordersearchutil.simplesearch(themedisplay, keywords, serviceordersforuserext); int count = serviceordersearchutil.searchcount(); %> <liferay-ui:panel-container extended="true" accordion="true" id="lfrpc1"> <liferay-ui:panel title='<%= languageutil.get(pagecontext, "maisorders") + " (" + count + ")"%>' collapsible="true" defaultstate="open" id="lfrp1" > <liferay-ui:search-container iteratorurl="<%= iterurl%>" emptyresultsmessage="no-service-orders-were-found" delta="<%= delta%>"> <liferay-ui:search-container-results> <% results = list; total = count; results = listutil.sublist(results, searchcontainer.getstart(), searchcontainer.getend()); pagecontext.setattribute("results", results); pagecontext.setattribute("total", total); %> </liferay-ui:search-container-results> <%@ include file="/jsp/dizo-chief-panel/serviceorder_columns.jspf"%> <liferay-ui:search-iterator searchcontainer="<%= searchcontainer%>" paginate="true" /> </liferay-ui:search-container> </liferay-ui:panel> </liferay-ui:panel-container> </div> <div> <% list = serviceordersearchutil.simplesearchmv(themedisplay, keywords, serviceordersext); count = serviceordersearchutil.searchcount(); %> <liferay-ui:panel-container extended="true" accordion="true" id="lfrpc2"> <liferay-ui:panel title='<%= languageutil.get(pagecontext, "mvrequests") + " (" + count + ")"%>' collapsible="true" defaultstate="close" id="lfrp2" > <liferay-ui:search-container iteratorurl="<%= iterurl%>" emptyresultsmessage="no-service-orders-were-found" delta="<%= delta%>"> <liferay-ui:search-container-results> <% results = list; total = count; results = listutil.sublist(results, searchcontainer.getstart(), searchcontainer.getend()); pagecontext.setattribute("results", results); pagecontext.setattribute("total", total); %> </liferay-ui:search-container-results> <%@ include file="serviceorder_columns.jspf"%> <liferay-ui:search-iterator searchcontainer="<%= searchcontainer%>" paginate="false" /> </liferay-ui:search-container> </liferay-ui:panel> </liferay-ui:panel-container> </div> </aui:form>
sorry english ;)
you need use 2 iterator urls , 1 each search container, use 'curparam' in each search:container
for example :
string table1cur = paramutil.getstring(renderrequest,"table1cur"); portleturl table1url = renderresponse.createrenderurl(); table1url.setparameter("table1cur", table1cur); <liferay-ui:search-container id="table1search" iteratorurl="<%= table1url %>" curparam="table1cur" >
Comments
Post a Comment