Where do you have your LoadableDetachableModel declared? And what kind
of IDataProvider are you talking about? If it is wicket's
IDataProvider than it has to be serializable, because DataView/Table
keep it's reference.
LoadableDetachableModel is usually declared as anonymous class inside
component/page, which is serialized anyway, so the implicit reference
makes no difference.
-Matej
On 10/25/07, Stefan Fußenegger <[EMAIL PROTECTED]> wrote:
>
> Hi folks,
>
> I am quite new to wicket but I already figured out that it deserved its name
> ;) Currently, I am playing around with IDataProvider in conjunction with
> LoadableDetachableModels. As far as I understand, the main purpose of
> LoadableDetachableModels is to tune serialization performance. At the
> beginning I looked at the API doc, which suggested using anonymous inner
> classes for detachable models:
>
>
> public IModel model(Object object) {
> return new LoadableDetachableModel() {
> protected Object load() {
> /* snip - (re)load the object */
> }
> };
> }
>
>
> However, this might not be suited for serialization, as inner classes have
> an implicit reference on their enclosing object - which was the
> IDataProvider implementation in my case. As a consequence the IDataProvider
> object (and all its possible fileds!) would be serialized together with
> every serialized LoadableDetachableModel - which would lead to an unwanted
> serialization overhead.
>
> Am I missing something here? Like some Wicket serialization voodoo that
> takes care of it? If not, it would be worth mentioning in the API doc and
> probably in the wiki as well (I would take care of the wiki if I get green
> lights).
>
> Regards, Stefan
> --
> View this message in context:
> http://www.nabble.com/LoadableDetachableModel-and-anonymous-inner-classes---unwanted-serialization-overhead--tf4689309.html#a13402266
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]