Description
As advised by the javadoc for Component#onConfigure, we switched to this mechanism instead of overriding isVisible/isEnabled when they contain extensive logic.
Now if we do that for a child component that will control the visibility of the EnclosureContainer, EnclosureContainer#isVisible directly calls through to #isVisible on the child component, and this may happen before #onConfigure on the child ever gets called. In our situation where we set the visibility in #onConfigure, the result of #isVisible may change during the request cycle, which may lead to undesirable and confusing results.
The javadoc for Component#configure states that for linked components, #configure should be called on the 'other' component. Applied to EnclosureContainer, I think the correct way to handle this is that EnclosureContainer#onConfigure must be overridden in order to call child.configure(). This way, any call to #isVisible will only occur after #onConfigure has been called, the sequence is correct again.
Attachments
Issue Links
- breaks
-
WICKET-5218 EnclosureContainer calls child#configure() way before rendering
- Resolved