Results 1 to 2 of 2
  1. #1
    Iori Yagami is offline Member
    Join Date
    Feb 2009
    Posts
    2
    Rep Power
    0

    Default Filtering data in a JSF dataTable

    I'll explain my problem with an example.
    I have a bean Person (name, age, address).
    I have a query whose the results in List.
    I want to display that List in dataTable.

    I know how to use dataTable to show simple List. But in my case, the getList is parametrized by the query. I want to use this dataTable to display all the person whose the age is under 15, for example, or whose the name begins with "n" etc...

    Do anyone know some best practices to do that?

    thanks

  2. #2
    renato is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Default

    if you want display only age under 15, put one condition. For example:
    XML Code:
    ...
    //in line of table
    <h:outputText value="#{bean.age}" rendered="#{bean.age < 15}" />
    ...
    i think that this way is correct!

Similar Threads

  1. JSF datatable with calendar component
    By thilak in forum JavaServer Faces (JSF)
    Replies: 3
    Last Post: 06-25-2009, 07:53 AM
  2. Row id in datatable
    By nc_newie in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 06-26-2008, 11:32 AM
  3. Deleting files after filtering the extensions
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-25-2008, 07:00 PM
  4. filtering data in jsf
    By bbq in forum JavaServer Faces (JSF)
    Replies: 2
    Last Post: 07-04-2007, 08:52 AM
  5. Jsf, Filtering Data In A Table
    By Freddie in forum JavaServer Faces (JSF)
    Replies: 2
    Last Post: 05-11-2007, 12:59 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
  •