Results 1 to 3 of 3
  1. #1
    Freddie is offline Member
    Join Date
    May 2007
    Posts
    41
    Rep Power
    0

    Default 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

    Java 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);
    Last edited by Freddie; 06-01-2007 at 03:00 PM.

  2. #2
    Alan is offline Member
    Join Date
    May 2007
    Posts
    39
    Rep Power
    0

    Default

    very easy Freddie!

    x OR y <==> not ((not x) AND (not y))

  3. #3
    Freddie is offline Member
    Join Date
    May 2007
    Posts
    41
    Rep Power
    0

Similar Threads

  1. Data from a model class won't show up in the table
    By ayampanggang in forum AWT / Swing
    Replies: 3
    Last Post: 11-27-2008, 09:20 PM
  2. Replies: 0
    Last Post: 02-09-2008, 09:22 PM
  3. Replies: 1
    Last Post: 02-01-2008, 02:21 PM
  4. Data formatting for the <display:table>
    By yuchuang in forum Web Frameworks
    Replies: 3
    Last Post: 12-14-2007, 11:52 AM
  5. filtering data in jsf
    By bbq in forum JavaServer Faces (JSF)
    Replies: 2
    Last Post: 07-04-2007, 09:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •