You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/01/27 17:41:00 UTC

[jira] [Commented] (WICKET-6863) Method Component.setVisibilityAllowed should call onVisibleStateChanged()

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

ASF subversion and git services commented on WICKET-6863:
---------------------------------------------------------

Commit bb5900dcafe639c55e90f3341c99352a3632b6c0 in wicket's branch refs/heads/wicket-8.x from Sven Meier
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=bb5900d ]

WICKET-6863 clear visibileInHierarchy

when visibilityAllowed changes


> Method Component.setVisibilityAllowed should call onVisibleStateChanged()
> -------------------------------------------------------------------------
>
>                 Key: WICKET-6863
>                 URL: https://issues.apache.org/jira/browse/WICKET-6863
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 9.2.0, 8.11.0
>            Reporter: Ondrej Fafejta
>            Assignee: Sven Meier
>            Priority: Major
>
> Problem is in cache of Component visibility introduced in WICKET-6839. 
> RFLAG_VISIBLE_IN_HIERARCHY_SET
> If we use {{setVisibilityAllowed}} instead of {{setVisible}} exception is thrown.
> {code:java}
> org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. Possible reasons could be that:
>         1) you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered),
>         2) if your components were added in a parent container then make sure the markup for the child container includes them in <wicket:extend>.
>  {code}
> One posible solution is to call cleaning visibility cache in method {{Component.setVisibilityAllowed}}.
> e.g.
> Method {{Component.setVisibilityAllowed}} should call {{onVisibleStateChanged()}} as method {{Component.setVisible}} does.
> All is demonstrated in github project
> [https://github.com/fafejtao/wicket9.2_visibility_bug]
>  
> [https://github.com/fafejtao/wicket9.2_visibility_bug/blob/master/src/main/java/com/mycompany/MyPanel.java#L22]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)