Conclusion: wrapOnAssignment is not the right way to obtain the behavior we want.
What we are looking for is some transparent way for users to provide data to components that do not get stored with these components when the page is serialized. By making these 'context-stored' data-structures implement 'IComponentAssignedModel', the user did not have to treat these any different from other models. Just by assigning them, they got wrapped in another model that assured that these data would not be stored with the page. Is there some correct 'Wicket' pattern for this ? Or should we just invent some other model-like interface for these data-structures, so that the user can not assign these to a component directly ? Sadly enough, then he will have to do the wrapping himself. Jan. -- View this message in context: http://www.nabble.com/NPE-in-Component.detachModel%28%29-when-wrappedModel-is-null-tf4048326.html#a11503313 Sent from the Wicket - Dev mailing list archive at Nabble.com.