[英]Primefaces datatable filterBy String
我已经阅读了建议的帖子,但没有一个对我的问题有效。 问题是,在选择筛选条件时,什么也没有发生。
<h:form id="form">
<p:dataTable var="task" value="#{searchMB.tasksBean}"
emptyMessage="No tasks found with given criteria"
widgetVar="tasksTable" filteredValue="#{searchMB.filteredTasks}">
<p:column headerText="Priority" filterBy="#{task.priority}" filterMatchMode="in">
<f:facet name="filter">
<p:selectCheckboxMenu label="Show only.." onchange="PF('tasksTable').filter()" panelStyle="width:125px" scrollHeight="50">
<f:selectItems value="#{searchMB.priorities}" />
</p:selectCheckboxMenu>
</f:facet>
<h:outputText value="#{task.priority}" />
</p:column>
在支持 bean 中没有什么特别的,只是加载任务和任务列表、filteredTasks 和选择菜单的优先级的方法。
请指教。
更新(我试过的链接)
primefaces 数据表过滤器不起作用- 我不知道为什么这不起作用,没有任何反应。 我还尝试使用 contains,立即搜索信号优先级。
我遇到了类似的问题,搜索了很长时间,从浏览器控制台日志中看到了这个错误-“未捕获的类型错误:无法读取未定义的属性‘keycode’”
这是由于 jQuery 冲突,我已禁用所有 jQuery 导入并且工作正常。 在这里得到了解决方案-
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.