i'm using the value list handler pattern, but i still have one doubt.
I show the results on the jsp 10 by 10, and also show a field like
"8000 results found"
The collection that i return to the jsp is full of DTOs (suppose, a list of companies, for this case the collection will be filled with companyDTOs). As the collection that is returned to the jsp has always a size of 10 (as i said, i return the results in 10 elements a time) i need to make 2 remote calls to my session bean to get the total numbers of results and the 10 next restults themselves.
Somthing like this. After the user press "Search".
In a servlet:
// call EJB to get the list of results.
// set variable in request (or session) scope
// call EJB to get the list of the first 10 results
// set collection in request (or session) scope
As you can see i don't know how to get the total number of found elements (wich is 8000 for the example) and a list of my first N elements in the same remote call. I cannot set the number of total results in the collection that keep the DTOs, would'n be good.
How can i avoid this 2 remote calls???