首页 > 解决方案 > Liferay 搜索迭代器仅在页面选择器中显示前 11 个页面

问题描述

我有一个 liferay 搜索容器,其中包含数千个结果,并附加了一个搜索迭代器。在页面选择器下拉列表中,它只会显示前 11 个页面

前 11 页

单击后面的页面(我选择第 11 页)它会展开以显示接下来的 10 页

下一组页面

选择更多页面只会显示 20 页的页码(即选择第 40 页将显示页码 30 到 50)。

如何更改它以显示从 1 到 161 的所有页面?

我尝试更改 search-iterator类型以及添加单独的search-paginator,但两者均未解决问题。

我还尝试更改搜索增量,这对页面选择器没有任何影响。

以下是用于创建搜索容器的 JSP 代码:

<% rowChecker = new RowChecker(renderResponse); %>

<liferay-ui:search-container searchContainer="${itemsSearchContainer}" rowChecker="<%=rowChecker%>" total="${itemsSearchContainer.total}">
    <liferay-ui:search-container-results results="${itemsSearchContainer.results}"/>
    <liferay-ui:search-container-row modelVar="item" keyProperty="itemKey" className="ItemDetail">
        <%-- Hidden: liferay-ui:search-container-column-text columns --%>
    </liferay-ui:search-container-row>

    <liferay-ui:search-iterator />

</liferay-ui:search-container>

标签: javahtmljspliferay

解决方案


有一个属性可以配置要在该选择上查看的页面,因此如果您更改该数字将显示页面的增长

Set the maximum number of pages available above and below the currently displayed page.

Defaults:
search.container.page.iterator.max.pages=10

推荐阅读