java - Liferay 搜索迭代器仅在页面选择器中显示前 11 个页面
问题描述
我有一个 liferay 搜索容器,其中包含数千个结果,并附加了一个搜索迭代器。在页面选择器下拉列表中,它只会显示前 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>
解决方案
有一个属性可以配置要在该选择上查看的页面,因此如果您更改该数字将显示页面的增长
Set the maximum number of pages available above and below the currently displayed page.
Defaults:
search.container.page.iterator.max.pages=10
推荐阅读
- python - 在带有 GitHub 页面的 markdown 文件 (index.md) 中嵌入绘图交互式图表,而不是使用 Jekyll
- javascript - 在应用脚本中向历史日期添加天数
- python - 点击标签 Selenium 自动化
- javascript - 将枚举 JavaScript 转换为数组,并在数组中选择一个随机元素
- javascript - React - TypeError:无法设置未定义的属性'props'
- selenium - 如何自动化使用外部应用程序的网站?
- javascript - 为什么 firebase onAuthStateChanged 总是返回空值?
- excel - VBA 项目窗口中的文件夹已消失
- autohotkey - AutoHotKey 粘贴到 win 密码提示中
- javascript - 在 axios.post() 请求后返回一个变量