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

Andrea Del Bene commented on WICKET-5835:
-----------------------------------------

Right. But to be more precise, with this solution both Enclouser#isVisible() 
and InlineEnclosure#updateVisibility() are no more useful and I'm considering 
to remove them from master branch. To me InlineEnclosure#updateVisibility() 
looks like an hack while we can (and should) rely on standard component 
lifecycle hooks.
For 6.x branch I cannot remove public method such as updateVisibility for 
backward compatibility. What I could do is to slightly modify onConfigure like 
this:

{code}
@Override
        protected void onConfigure()
        {
                super.onConfigure();
                final Component child = getChild();
                
                child.configure();
//              boolean childVisible = child.determineVisibility();
//              
//              setVisible(childVisible);
        }
{code}

but I don't see a huge benefit...

> InlineEnclosure doesn't call child.configure() before updating its visilbity
> ----------------------------------------------------------------------------
>
>                 Key: WICKET-5835
>                 URL: https://issues.apache.org/jira/browse/WICKET-5835
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 7.0.0-M5, 6.19.0
>         Environment: Any
>            Reporter: Raoul Zander
>            Assignee: Andrea Del Bene
>            Priority: Minor
>              Labels: enclosure
>             Fix For: 6.20.0, 7.0.0-M6
>
>         Attachments: enclosure-quickstart.zip
>
>
> org.apache.wicket.markup.html.internal.InlineEnclosure.updateVisibility()
> should propably call child.configure() before the visibility of the 
> InlineEnclosure is set to the visibility of the child.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to