0

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

Ana Tayffy
  • 39
  • 2
  • 7
  • _"I have already read suggested posts, "_ which ones? See [ask] – Kukeltje May 30 '17 at 11:19
  • @Kukeltje , firstly thank you very much for your interest. Here are some links that I thought might be useful: https://stackoverflow.com/questions/24765075/primefaces-datatable-filtering-not-working https://stackoverflow.com/questions/32166118/primefaces-datatable-filter-is-not-working https://stackoverflow.com/questions/35970922/primefaces-datatable-filter-search-by-not-found https://stackoverflow.com/questions/36529787/filterby-using-column-doesnt-work-in-primefaces-5-3 – Ana Tayffy May 30 '17 at 11:29
  • Please add that to your question... better readable. And also explain why they did not help – Kukeltje May 30 '17 at 11:30
  • See the color column at https://www.primefaces.org/showcase/ui/data/datatable/filter.xhtml – Jasper de Vries May 30 '17 at 12:58
  • @JasperdeVries I don't notice any difference between their example and my code. – Ana Tayffy May 30 '17 at 13:16
  • I could not tell based on the information you've put here. Please provide a [mcve]. – Jasper de Vries May 30 '17 at 13:18

1 Answers1

0

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

MAK526
  • 1