[英]Primefaces datatable filterBy String
I have already read suggested posts, but none of them worked for my issue.我已经阅读了建议的帖子,但没有一个对我的问题有效。 The problem is that when selecting a criteria to filter by, nothing happens.
问题是,在选择筛选条件时,什么也没有发生。
<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>
In the backing bean there is nothing special, just the method that is loading tasks and lists for tasks, filteredTasks and priorities for selectmenu.在支持 bean 中没有什么特别的,只是加载任务和任务列表、filteredTasks 和选择菜单的优先级的方法。
Please advise.请指教。
Update (links I tried)更新(我试过的链接)
primefaces Datatable filter is not working - i don't know why this is not working, nothing happens. primefaces 数据表过滤器不起作用- 我不知道为什么这不起作用,没有任何反应。 I also tried with contains, to search for a signle priority at once.
我还尝试使用 contains,立即搜索信号优先级。
FilterBy using column doesn't work in primefaces 5.3 - nothing happens FilterBy using column 在 primefaces 5.3 中不起作用- 没有任何反应
Primefaces dataTable filter search By not found - nothing happens, too Primefaces dataTable filter search By not found - 也没有任何反应
I had similar problems, searched long, from browser console log saw this error- "uncaught type error: cannot read property 'keycode' of undefined"我遇到了类似的问题,搜索了很长时间,从浏览器控制台日志中看到了这个错误-“未捕获的类型错误:无法读取未定义的属性‘keycode’”
This was due to jQuery conflict, I have disabled all jQuery imports and working fine.这是由于 jQuery 冲突,我已禁用所有 jQuery 导入并且工作正常。 Got the solution here-
在这里得到了解决方案-
<p:autoComplete> Uncaught TypeError: Cannot read property 'keyCode' of undefined <p:autoComplete> 未捕获的类型错误:无法读取未定义的属性“keyCode”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.