Liferay搜索容器分页 [英] Liferay Search Container pagination

查看:67
本文介绍了Liferay搜索容器分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在代码中使用了liferay-ui:search-container.

I have used liferay-ui:search-container in my code.

在我单击NEXT之前,搜索结果一直正确显示.正在重新加载该portlet,这将我带到portlet的第一页,从而破坏了显示的搜索结果.

the search results are being displayed properly till i click on the NEXT. The portlet is being reloaded and that is taking me to the first page of the portlet, trashing the presented search results.

即使重新加载了Portlet,如何保留搜索结果?

How do I retain the search results even after the portlet gets reloaded?

推荐答案

如果iteratorURL属性的默认行为不符合您的需要,则可以为其提供值.

You can give a value to the iteratorURL attribute if its default behaviour doesn't fit your needs.

在以下示例中,当您在搜索结果表上单击下一步"时,将使用param1和param2调用portlet的proccesAction()方法.

In the following example when you click 'Next' on the search result table the proccesAction() method of the portlet will be invoked with param1 and param2.

您可以向该方法添加逻辑以保留搜索结果.

You can add logic to that method to retain your search results.

<%
PortletURL urlPaginator=renderResponse.createActionURL();
urlPaginator.setParameter("param1", value1);
urlPaginator.setParameter("param2",value2);
%>

<liferay-ui:search-container iteratorURL="<%=urlPaginator%>">

这篇关于Liferay搜索容器分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆