0
votes

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.

enter image description here

<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.

Please advise.

Update (links I tried)

primefaces Datatable filter is not working - i don't know why this is not working, nothing happens. I also tried with contains, to search for a signle priority at once.

FilterBy using column doesn't work in primefaces 5.3 - nothing happens

Primefaces dataTable filter search By not found - nothing happens, too

1
"I have already read suggested posts, " which ones? See How to AskKukeltje
@Kukeltje , firstly thank you very much for your interest. Here are some links that I thought might be useful: stackoverflow.com/questions/24765075/… stackoverflow.com/questions/32166118/… stackoverflow.com/questions/35970922/… stackoverflow.com/questions/36529787/…Ana Tayffy
Please add that to your question... better readable. And also explain why they did not helpKukeltje
@JasperdeVries I don't notice any difference between their example and my code.Ana Tayffy

1 Answers

0
votes

I had similar problems, searched long, from browser console log saw this error- "uncaught type error: cannot read property 'keycode' of undefined"

This was due to jQuery conflict, I have disabled all jQuery imports and working fine. Got the solution here-

<p:autoComplete> Uncaught TypeError: Cannot read property 'keyCode' of undefined