Fórumok
Problem with Pagination
pawan chauhan, módosítva 11 év-val korábban
Problem with Pagination
Junior Member Bejegyzések: 75 Csatlakozás dátuma: 2012.10.08. Legújabb bejegyzések
Hi all,
I am trying to implement pagination. I read almost all the forms availaible on the topic and tried to implement but i am still facing some troubles.
Below is what i tried to do
announcements -- is the list that contains my data and
com.test.model.Announcement - is my model class
Going ahead with this i get an error saying -
Its been hours on some silly mistake can anyone please help me.
Regards,
Pawan Chauhan
I am trying to implement pagination. I read almost all the forms availaible on the topic and tried to implement but i am still facing some troubles.
Below is what i tried to do
<%
List<announcement> announcements = AnnouncementLocalServiceUtil.getAnnouncements(0,announceCount);
%>
<%
PortletURL iteratorURL = renderResponse.createRenderURL();
iteratorURL.setParameter("jspPage", "/announcement.jsp");
%>
<liferay-ui:search-container delta="20" iteratorurl="<%= iteratorURL %>" emptyresultsmessage="No items to show">
<liferay-ui:search-container-results total="<%=announcements.size() %>" results="<%=announcements%>" />
<liferay-ui:search-container-row classname="com.test.model.Announcement" modelvar="item">
<liferay-ui:search-container-column-text name="Id" value="<%= item[0]!=null ? item[0].toString() : \" \" %>"/>
<liferay-ui:search-container-column-text name="Descr" value="<%= item[1]!=null ? item[1].toString() : \" \" %>"/>
</liferay-ui:search-container-column-text></liferay-ui:search-container-column-text></liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
</announcement>
announcements -- is the list that contains my data and
com.test.model.Announcement - is my model class
Going ahead with this i get an error saying -
The type of the expression must be an array type but it resolved to Announcement
Its been hours on some silly mistake can anyone please help me.
Regards,
Pawan Chauhan
pawan chauhan, módosítva 11 év-val korábban
RE: Problem with Pagination
Junior Member Bejegyzések: 75 Csatlakozás dátuma: 2012.10.08. Legújabb bejegyzések
It was actually a very stupid mistake
Finally got it working,
Thanks all..
Regards,
Pawan Chauhan.
Finally got it working,
Thanks all..
Regards,
Pawan Chauhan.