0

After doing two days resarch on this issue i ve decided to seek some help from you guys. Filter of datatable is not working. I ll be grateful. My code for datatable is

      <p:dataTable widgetVar="#{ctrbean.list}"   
         id="hhh" editMode="row" disabledSelection="true" rowKey="#{p.ID}" 
         scrollable="true" value="#{ctrbean.list}" var="p" 
         style="width: 800px ; position: absolute; top:150px ; left:250px"
         filteredValue="#{ctrbean.list}">

    <p:column   id="r" headerText="ID" 
    filterBy="#{p.ID}" filterMatchMode="contains" >
    <h:outputText value="#{p.ID}" />
    </p:column> ....and other coloumns
    </p:datatable>

enter image description here

enter image description here

hina abbasi
  • 445
  • 1
  • 4
  • 14
  • i can't see anything wrong with the code. can you post your pojo for the list? it may be possible that ID is not all caps in the getter setter – Fritz Aug 24 '15 at 07:38
  • 1
    No-oooooonnnneee will help you if you beg for help this way. And a very small debugging would most likely show that the contains filter only works for strings and I bet your ID is not a string. I bet the contains filter does work for name. All simple things you can and should debug yourself. And an mcve would have made this explicit – Kukeltje Aug 24 '15 at 21:36
  • @fritz: it would not have been visible in the datatable then either – Kukeltje Aug 24 '15 at 21:42
  • @Kukeltje ID is String datatype dear, – hina abbasi Aug 27 '15 at 23:28

0 Answers0