recently i needed to determine the visibility of a component depending on the visibilty of the respective child components (container should be visible if at least one child is visible). Due to the fact i'm setting the visibility of every component in the respective onConfigure()-methods i cant use this method to fullfil my needs. So i switched into the onBeforeRender-methods and did the job there -> works great. After that i wanted to extract this into a behavior since this is more reusable. Still i cant use the onconfigure-method and i tried the respective beforeRender-method. But now wicket throws an exception claiming
"Cannot modify component hierarchy after render phase has started (page version cant change then anymore)"
I think either the naming or the behavior of this method is weird. Is there no possibility to solve this with a behavior? :(
What do u think?