You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (Jira)" <ji...@apache.org> on 2021/01/27 17:42:00 UTC
[jira] [Resolved] (WICKET-6863) Method
Component.setVisibilityAllowed should call onVisibleStateChanged()
[ https://issues.apache.org/jira/browse/WICKET-6863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sven Meier resolved WICKET-6863.
--------------------------------
Fix Version/s: 8.12.0
9.3.0
Resolution: Fixed
Thank you very much for the detailed bug report!
> 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
> Fix For: 9.3.0, 8.12.0
>
>
> 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)