Hi, see this issue: https://issues.apache.org/jira/browse/WICKET-4 some comment i make there:
yes onAttach() and onBeforeRender is now purely for the render phase (those 2 methods are pretty much the same thing) onDetach() is called always so that models and components are detached correctly. And detach() must be called even if (the current) attach is not called because of that. So when you submit a form and then respond/render to another page the onAttach is not called for that page with that form. But detach is.. I think this is wrong and i already have said i think on the user list how it should be: (last night i really needed that onattach anyway that i now have found through IPageEntry...) on submit request comes in respond to same page: Page.onAttach(); form.onSubmit(); Page.onBeginRender(); Page.render(); Page.onEndRender(); Page.onDetach(); on submit request comes in respond to another page: Page1.onAttach(); form.onSubmit(); Page2.onAttach(); Page2.onBeginRender(); Page2.render(); Page2.onEndRender(); Page2.onDetach(); Page.1onDetach(); The problem is that this really breaks onAttach behavior.. because what is not onattach is then onbeforerender. For example ListView builds up its new items in onattach that should be done then in onbefore render. But we have a much nicer and better contract then when is what and we have a callback method when a page is used by wicket (when it comes out of the pagemap or when it is set/used as a response page) what do you guys think? johan
