On Mon, Oct 6, 2008 at 4:07 AM, jensiator <[EMAIL PROTECTED]> wrote:
>
> Hello
> Im working on a Pageable dataview using SortableDataProvider  and I have
> trouble to find out how It should be done regarding memory use versus
> database requests. I've looked on the repeaters live action and read the
> model chapter in "wicket in action".
>
> 1. If I dont use the loadabledetachableModel I need to implement
> Serializable in my modelobject corrensponding to a row in the dataview.
> Wicket wants to serialize the modelobject to the session. What will/might
> happen to the webapplication memory if I choose this approach? How long will
> the data be stored in the session?

The data is stored until the session dies.  Wicket does page stuff out
to disk automatically for you, though, so your memory consumption
remains reasonable.  Only the "current" version of a page will be
stored in memory/session.
>
> 2. All the examples I have seen regarding the loadable approach seems to be
> calling the db a little to much. When implementing the SortableDataProvider
> iterator method, all examples call the db for the data to be shown in the
> current page. Then the model extending LoadableDetachableModel will load (in
> load method) the Models data again from some kind of identifier. It seems to
> be that were loading all data twice. Is this how it should be done?

Sounds like you might not be setting up your LDM correctly.  The LDM
shouldn't need to load anything if you create it using the actual
object it needs to return.  On subsequent requests, it will have to
load(), but not on the request in which it is constructed.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to