Component.onAttach/onBeforeRender/onAfterRender changes.

Before we had this behaviour:

new Page:

Page constructed
Page.onAttach() -> all the components are visited
Page.onBeforeRender()
Page.render ->
childComponent.onBeforeRender()
childComponent.render()
childComponent.onAfterRender()
Page.onAfterRender()
Page.onDetach() -> all the components are visited

Listener request which sets a new page:

Page1.componentCalled() >- Page2 is set to response.
Page2.onAttach() -> all the components are visited
Page2.onBeforeRender()
Page2.render ->
childComponent.onBeforeRender()
childComponent.render()
childComponent.onAfterRender()
Page2.onAfterRender()
Page2.onDetach() -> all the components are visited
Page1.onDetach() -> all the components are visited

So the page1 ondetach is called but not the on attach
in 1.3 on attach is changed so that when a page is used, for an interface
call or rendering, on attach is called.
onBeforeRender did become onAttach because they where pretty much the same
already.
so now the behavior is this:

Page1.onAttach() -> all the components are visited
Page1.componentCalled() >- Page2 is set to response.
Page2.onAttach() -> all the components are visited
Page2.onBeforeRender() -> all the components are visited
Page2.render()
Page2.onAfterRender() -> all the components are visited
Page2.onDetach() -> all the components are visited
Page1.onDetach() -> all the components are visited

And in onAttach the component structure can't change anymore. This is now
moved to onBeforeRender.
So everything that was done before this change in onAttach should be done in
onBeforeRender
also in all the 4 call backs we have now
(onAttach,onBeforeRender,onAfterRender and onDetach()) you have
to make a super.xxx call else you will get an exception.
i updated wiki with this info:
http://cwiki.apache.org/confluence/display/WICKET/Migrate-1.3#Migrate-1.3-Component.onAttach%2FonBeforeRender%2FonAfterRenderchanges
.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to