The new PaginatedList is excellent with support for calling the SQL automatic without you having to worry about it.
We are developing a web based application - yeah many are in these days.
I'm concidering to use the paginated list instead of our own homegrown - remeber SQL search criteria and other parameters and execute the SQL again when the user goes back and forward.
All this information is stored in the PaginatedList.
But my question is as some of my collegues dislike storing information in the HttpSession. As to keep the PaginatedList during a multiple Http request/responses we need to store this object on the server and we can use the HttpSession for this.
But you have always been told to keep the information stored in the HttpSession to be small.
A PaginatedList with the list data is not small.
Or should we just go with it and store it in the Session.
/Claus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, the PaginatedList that you store is quite small and is determined by the page size that you specify. I don't see a problem with storing it in HttpSession.
But if you're really concerned, you could always use your own singleton....but that hurts in a clustered environment...
If you do use your own implementation, there's an example in JPetStore 2.x that shows how to page without storing any information in the session. Actually there's 2 different paging approaches in JP2.0 (but neither uses PaginatedList...yet).
I know you'll figure it out. :-)
Cheers,
Clinton
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
The new PaginatedList is excellent with support for calling the SQL automatic without you having to worry about it.
We are developing a web based application - yeah many are in these days.
I'm concidering to use the paginated list instead of our own homegrown - remeber SQL search criteria and other parameters and execute the SQL again when the user goes back and forward.
All this information is stored in the PaginatedList.
But my question is as some of my collegues dislike storing information in the HttpSession. As to keep the PaginatedList during a multiple Http request/responses we need to store this object on the server and we can use the HttpSession for this.
But you have always been told to keep the information stored in the HttpSession to be small.
A PaginatedList with the list data is not small.
Or should we just go with it and store it in the Session.
/Claus
Hi Claus,
Actually, the PaginatedList that you store is quite small and is determined by the page size that you specify. I don't see a problem with storing it in HttpSession.
But if you're really concerned, you could always use your own singleton....but that hurts in a clustered environment...
If you do use your own implementation, there's an example in JPetStore 2.x that shows how to page without storing any information in the session. Actually there's 2 different paging approaches in JP2.0 (but neither uses PaginatedList...yet).
I know you'll figure it out. :-)
Cheers,
Clinton