it is still an issue if you pass such a model between pages. i dont see why you would need an anonymous model instance.
-igor On 10/12/07, marcus dickerhof <[EMAIL PROTECTED]> wrote: > > Hi, > I am quite new to wicket, and I want to avoid making serious mistakes :-) > On the Bestpractices and gotachs page: > http://cwiki.apache.org/WICKET/best-practices-and-gotchas.html > I found the following statement from Martijn Dashorst: > > --START > 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. > > Search in the mailinglist for outofmemoryerror for other descriptions of > this behaviour. I doubt that I have done the subject justice. > > --END > > Is this still an issue? And how would I do a > workaround? Where can I find more infos concerning this problem? > > > Thanks a lot! > > Best regards > Marcus >
