0

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

<%@ 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 ..

4

1 回答 1

0

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

##
## Search Container
##

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

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

于 2016-11-26T03:25:11.380 回答