versioning can handle this. because it won't clone the page but you will
keep the reference to the old page for every of course.

and if that page2 gets saved to disk and reloaded back in it will also
instantiate the page1 again ofcourse.
So you will have always that baggage of that extra page.

in 2.0 we have already code that does the clone by mapping the object
that is more sophisticated as the 1.2/1.3 code that just saving it to a byte
array and back again.
But we don't use it except 5 or 6 tests.

The methods are mapObject and restoreObject of the class Objects.
With that versioning is completely automatic. But i don't know anymore what
the end status was
what we should do.. igor?

johan

On 12/6/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote:

From the gotchas page on our wiki:

The other thing to avoid is anonymous or nested instances of IModel.
Usually you share an instance of a model between two page instances.
If you create an anonymous or nested instance of IModel, then you
automatically get a 'this' reference to the class that surrounds it.
This will usually be the page, but can also be the form or a listview.
Anyway, because the reference is /final/, you will copy that reference
to the old page, with the model to the new page, thus duplicating the
component tree (it gets versioned etc.). This will eventually lead to
OutOfMemoryError.

Does this still hold? I thought we did something to remedy this?

Martijn
--
<a href="http://www.thebeststuffintheworld.com/vote_for/wicket";>Vote</a>
for <a href="http://www.thebeststuffintheworld.com/stuff/wicket
">Wicket</a>
at the <a href="http://www.thebeststuffintheworld.com/";>Best Stuff in
the World!</a>

Reply via email to