Foren

Liferay7 JSP tag liferay-ui:search-container-results

Heiner Kücker, geändert vor 7 Jahren.

Liferay7 JSP tag liferay-ui:search-container-results

New Member Beiträge: 10 Beitrittsdatum: 05.09.16 Neueste Beiträge
All examples i found for the liferay-ui:search-container-results tag contain tag attributes
results
and
total.

In Liferay7 tag lib descriptor file

liferay-ui.tld

the tag attribute total is gone for tag liferay-ui:search-container-results.

In Liferay 7 sources i found the attribute total in tag liferay-ui:search-container, but my jsp shows no results (data is there, i checked this).

How works paginated browsing in liferay 7 ?

Can anyone post an example ?

Need help
Heiner
Heiner Kücker, geändert vor 7 Jahren.

RE: Liferay7 JSP tag liferay-ui:search-container-results (Antwort)

New Member Beiträge: 10 Beitrittsdatum: 05.09.16 Neueste Beiträge
Follows seems working

<%
searchContainer.setResults(XyzLocalServiceUtil.getXyz(searchContainer.getStart(),searchContainer.getEnd());
searchContainer.setTotal(XyzLocalServiceUtil.getXyz(-1, -1).size() );
%>

For -1 better use

com.liferay.portal.kernel.dao.orm.QueryUtil.ALL_POS

Cheers
Heiner
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Liferay7 JSP tag liferay-ui:search-container-results

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Yeah, Heiner, the totals attribute was removed from the search-container-result tag. Liferay is now following the convention of having a simpler nav model that shows a "More..." button to get more but no active track on just how many more there might be. This saves one query per page view so you could see this as a performance improvement... emoticon