On 8/30/05, Martin Marinschek <[EMAIL PROTECTED]> wrote: > With this, the dataModel of the list is serialized to the client (in > the component state) and will be used for all phases on the postback > until rendering response comes into place - then the new data-model > will be fetched from the database. > > So if you enqueue an action and wander off to the detail page, the > data will not be fetched again. Caveat: the dataModel is serialized to > the client. If you don't like the memory wasted in your session in the > meantime, this is a fair solution. > > I wonder what your solution would be? I mean - you have to store the > information at some place if you don't want to go back to the > database?
Have your persistence layer cache it if you really need caching. iBATIS, hibernate, they all can take care of this. I think it's so much messier to have to worry about all of this 'state storage of the data model' on the front end side. Make a call to the backend to get your collection each time you need it. If you need caching, turn it on on the persistence layer level. Why do so many seem to be against this? It's clean, simple, efficient and easy to understand the process. The only time I can see the need for keeping the 'whole data model' around is when doing a master/detail update of a bunch of rows.