Johan Compagner wrote:
> 
> I still can't see the complete picture here how you are avoiding that
> those
> data structures are not serialized with just using IComponentAssignedModel
> because that model is referenced by the component. And that model has to
> reference the real model because how else can it get the data that it
> shows?
> So if the wrapmodel has to have a reference to the real model why can't
> you
> return it in getWrappedModel()
> 
> johan
> 
> 

That's the whole point: in the wrapModel, I store a key with which I can
retrieve the wrappedModel from a context. So the wrapModel only stores a
'transient' reference to the wrappedModel, and its detach() clears that
reference. Whenever asked for, the wrapModel can retrieve the wrappedModel
from the context by key. The reference is only needed to improve retrieval
for the current requestCycle. 
-- 
View this message in context: 
http://www.nabble.com/NPE-in-Component.detachModel%28%29-when-wrappedModel-is-null-tf4048326.html#a11505093
Sent from the Wicket - Dev mailing list archive at Nabble.com.

Reply via email to