I've been trying to solve this problem for ages but still couldn't find a good
solution. I have an entity which looks like this:
| class Person{
| String name;
| int age;
| List<Review> reviews;
| List<Call> calls;
| }
|
in my jsf page, I have:
| <h:outputText value="person.name" />
| <h:outputText value="person.age" />
| <h:dataTable value="person.reviews" var="review"
rows="5">
| ...
| </h:dataTable>
|
| <h:dataTable value="person.calls" var="call"
rows="5">
| ...
| </h:dataTable>
|
|
both reviews and calls need to have their own page control because there can be more than
1000 rows.
The ideal way to do this is to have a scroller component that is similar to
t:dataScroller, but only load the required data rows from database each time when change
the page. However, this component doesn't exist in this world. Without such a
component, I would have to write customised HSqls for each entity and write my own
scroller component. Since I have a lot of entities that are similar to this one, it's
so time consuming to do it this way. Can someone give any advice what would be the
easiest way to solve this problem?
Also, I have another question, is there anyway to limit the number of returning rows when
define @OneToMany relationship. e.g. @OneToMany(fetch=FetchType.EAGER, maxNumberOfRows=10)
?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005996#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...