はい、私はそれを使用する方法を知っています。
それを行う例を示します。
<portlet:renderURL var="manageRelationsURL"
windowState="<%=LiferayWindowState.NORMAL.toString()%>">
<portlet:param name="action" value="manageRelations" />
</portlet:renderURL>
<%PortletURL iteratorURL = renderResponse.createRenderURL();
iteratorURL.setParameter("action", "manageRelations");
%>
<%
PortalPreferences portalPrefs = PortletPreferencesFactoryUtil.getPortalPreferences(request);
String orderByCol = ParamUtil.getString(request, "orderByCol");
String orderByType = ParamUtil.getString(request, "orderByType");
if (Validator.isNotNull(orderByCol) && Validator.isNotNull(orderByType)) {
portalPrefs.setValue("NAME_SPACE", "order-by-col", orderByCol);
portalPrefs.setValue("NAME_SPACE", "order-by-type", orderByType);
} else {
orderByCol = portalPrefs.getValue("NAME_SPACE", "order-by-col", "domainLabel");
orderByType = portalPrefs.getValue("NAME_SPACE", "order-by-type", "asc");
}
%>
<div style="">
<aui:form>
<liferay-ui:search-container delta="20" iteratorURL="<%=iteratorURL%>" emptyResultsMessage="There were not any match." orderByCol="<%= orderByCol %>" orderByType="<%= orderByType %>">
<liferay-ui:search-form
page="/WEB-INF/jsp/localAdministration/relations/search.jsp"
searchContainer="<%= searchContainer %>"
servletContext="<%= this.getServletConfig().getServletContext() %>"
showAddButton="true" />
<liferay-ui:search-container-results>
<%
List<RelationInstance> relationList = UtilsAdministration.getRelationListCache(themeDisplay.getUserId(),0, UtilsAdministration.getRelationListCacheSize(themeDisplay.getUserId()));
Collections.sort(relationList,RelationsComparator.getRelationsOrderByComparator(orderByCol, orderByType));
results = ListUtil.subList(relationList, searchContainer.getStart(),
searchContainer.getEnd());
if(relationList.size()<searchContainer.getEnd()){
results = ListUtil.subList(relationList, searchContainer.getStart(),
relationList.size());
total = relationList.size();
}else{
results = ListUtil.subList(relationList, searchContainer.getStart(),
searchContainer.getEnd());
total = relationList.size();
}
pageContext.setAttribute("results", results);
pageContext.setAttribute("total", total);
%>
</liferay-ui:search-container-results>
<liferay-ui:search-container-row className="RelationInstance" modelVar="aRelationInstance">
<liferay-ui:search-container-column-text name="First" value="<%=aRelationInstance.getFirstLabel()%>" orderable="<%= true %>" orderableProperty="domainLabel"/>
<liferay-ui:search-container-column-text name="Second" value="<%=aRelationInstance.getSecondLabel()%>" orderable="<%= true %>" orderableProperty="relationLabel"/>
<liferay-ui:search-container-column-text name="Third" value="<%=aRelationInstance.getRangeLabel()%>" orderable="<%= true %>" orderableProperty="rangeLabel"/>
<liferay-ui:search-container-column-jsp align="right" name="Acciones" path="/WEB-INF/jsp/localAdministration/relations/actionRelationButton.jsp"/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
</aui:form>
</div>
この場合、DB ではなく EhCache から反復するリストを取得します。
IteratorURL には、呼び出しているページと同じ URL が含まれている必要があります。
お役に立てば幸いです。