尝试通过独立的方式实现分页,将多个 Searchcontainer 映射到容器页面。
这里有 2 个具有不同列表的 Searchcontainer 来显示。我需要在第一个 Searchcontainer 中更改页面,并且不要在第二个中更改页面。(反之亦然)
<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>
对不起我的英语不好 ;)