Liferay搜索容器无法正常工作.cant请参阅liferay7中的下一页选项

时间:2016-07-11 13:12:13

标签: pagination portlet liferay-7 searchcontainer

我想在页面上显示项目列表..使用Liferay搜索容器.. 我正在使用Liferay 7.0 ge 1 这是我的代码.ItemFound是我用过的实体.. 我没有得到下一页,每页的tems ..以及所有。在屏幕上.. hELP ME

<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<%@page import="com.liferay.portal.util.*"%>
<%@ page import="com.Trylof.services.service.ItemFoundLocalServiceUtil" %>
<%@taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %>
<%@ page import="java.util.*" %>
<%@ page import="com.Trylof.services.model.ItemFound" %>
<%@ page import="com.liferay.portal.kernel.util.ListUtil" %>
<portlet:defineObjects />
<%
 int count = ItemFoundLocalServiceUtil.getItemFoundsCount();
List <ItemFound> books = ItemFoundLocalServiceUtil.getItemFounds(0, count);
%>
<liferay-portlet:renderURL varImpl="iteratorURLa">
<portlet:param name="mvcPath" value="/html/event/4.jsp" />
</liferay-portlet:renderURL>
<liferay-ui:search-container delta="5"  iteratorURL="<%=iteratorURLa %>" >
  <liferay-ui:search-container-results  >
<%                          `results=ListUtil.subList(books,searchContainer.getStart(),                          searchContainer.getEnd());
 total=books.size();
 pageContext.setAttribute("results", results);
pageContext.setAttribute("total", total);
%>
</liferay-ui:search-container-results>


  <liferay-ui:search-container-row
     className="com.Trylof.services.model.ItemFound"
    modelVar="aItemFound" keyProperty="ItemFoundId"
>

    <liferay-ui:search-container-column-text property="foundColor" name="color"/>

    <liferay-ui:search-container-column-text property="foundCompany" name="company"/>

    <liferay-ui:search-container-column-text property="foundDate"  name="date"/>

    <liferay-ui:search-container-column-text property="foundDesc"  name="desc"/>

    <liferay-ui:search-container-column-text property="foundLocation" name="location"/>

    <liferay-ui:search-container-column-text property="foundSize" name="size"/>

    <liferay-ui:search-container-column-text property="foundStatus" name="status"/>

    <liferay-ui:search-container-column-text property="foundType" name="Type"/>

    <liferay-ui:search-container-column-text property="itemFoundId" name="id"/>

    <liferay-ui:search-container-column-text property="userId" name="User id"/>


</liferay-ui:search-container-row>

<liferay-ui:search-iterator paginate="true"  />

请指导我哪里出错了..附件是输出的屏幕截图 https://drive.google.com/open?id=0B9t253zQ5s5eZWNiVGxTRVZYX2M

我无法添加屏幕截图,因为我没有足够的声誉.. PLZ ..

1 个答案:

答案 0 :(得分:0)

默认搜索容器增量为20.请参阅portal.properties文件:

##
## Search Container
##

    #
    # Set the default number of entries to display per page.
    #
    search.container.page.default.delta=20

您可以添加更多条目或更改portal-ext.porerties中的默认增量,以将其设置为合适的值:例如5。