Jsf, Filtering Data In A Table
Hello people, I have the following code that filters the rows of the table that have the telephone1= "xxxx" and telephone2="xxxx".
But I need filter by with an or, not with and "and"
telephone1 0R telephone2
Can you help me?
I will appreciate that
thank you
Code:
tableRowGroup2.clearFilter();
String tel = "xxxx";
CompareFilterCriteria criteria1 = new CompareFilterCriteria(getSessionBean1().getGroupdp().getFieldKey("telephone1"), tel);
CompareFilterCriteria criteria2 = new CompareFilterCriteria(getSessionBean1().getGroupdp().getFieldKey("telephone2"), tel);
FilterCriteria fCriteria[] = new FilterCriteria[2];
fCreteria[0] = criteria1;
fCreteria[1] = criteria2;
tableRowGroup2.getTableDataFilter().setFilterCriteria(fCreteria);