1 Reply Latest reply on Aug 15, 2009 1:00 PM by Stuart Douglas

    Populating two very similar dataTables with one query?

    Arbi Sookazian Master

      So I have two rich:dataTables on the same JSF page that are based on Lists from result sets that have two different filters in the where clause.

      So the select clause and from clause may be identical.  I am wondering if I can avoid two db trips and somehow dynamically apply the filter after the List is populated by the result set from Hibernate.

      Is this possible to do?  What is the best way to handle this scenario?

      I'd rather not iterate thru the List and dynamically remove entities in the List.  That seems strange and never seen an example like that in the JPA/Hibernate books.

      So to be more specific, one dataTable needs widgets in a certain status and the other needs widgets in all the other statuses (so two non-overlapping data sets).