Liferay Search Container not working .cant see next page option in liferay7

1.7k views Asked by At

I want to display list of items on a page..using Liferay search container.. I am using Liferay 7.0 ge 1 here is my code..ItemFound is the entity i have used.. I am not getting that next page ,tems per page ..and all .in the screen.. 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"  />

Please guide me where i have gone wrong.. Attached is screen shot of the output https://drive.google.com/open?id=0B9t253zQ5s5eZWNiVGxTRVZYX2M

I am not able to add screenshot as i dont have enough reputation.. plz ..

1

There are 1 answers

1
Rafik On

The default search container delta is 20. See portal.properties file:

##
## Search Container
##

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

You can add more entries or change the default delta in your portal-ext.porerties to set it to a suitable value : 5 for example.