[ 
https://issues.apache.org/jira/browse/WICKET-3398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987657#action_12987657
 ] 

Hudson commented on WICKET-3398:
--------------------------------

Integrated in Apache Wicket 1.4.x #406 (See 
[https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/406/])
    Issue: WICKET-3398


> EnclosureContainer: configure() should be called on the child component 
> before calling isVisible on it
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3398
>                 URL: https://issues.apache.org/jira/browse/WICKET-3398
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.15, 1.5-RC1
>            Reporter: Ulrike M
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.4.16, 1.5-RC2
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to