Hi all, Using 1.3.6, I've recently been simplifying some of my wicket code by using LoadableDetachableModels and PropertyModels instead of trying to manage static models in various ways.
I had a strange and subtle bug caused by the fact that a form button update call into the next layer would take parameters such as the item id being changed. To provide this item ID, I ended up resolving the model object, which caused the LoadableDetachableModel to be loaded. The problem was that this meant that the model was resolved before the update occurred, which means that as the page was re rendered, the stale model object was used as the source for the components. After the next update, the change made by the previous update would be shown. The ways that I can think of to fix this are 1. store the parameters needed for the update call instead of using the model object to retrieve them or 2. call detachModels on the component so that the models will be reloaded (kind of crappy performance wise). But there will be no compile errors or runtime warnings if I forget either of these, just a slightly stale view of the page. I'm worried that this bug will creep in again unless I can find a reliable way to make sure that any updating event handlers can't accidentally load the detachable model as they're updating. Has anybody found a good way to do this? Thanks Neil