留言板

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

Heiner Kücker,修改在7 年前。

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

New Member 帖子: 10 加入日期: 16-9-5 最近的帖子
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,修改在7 年前。

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

New Member 帖子: 10 加入日期: 16-9-5 最近的帖子
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,修改在7 年前。

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

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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