Description
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.
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>.
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
Attachments
Issue Links
- is duplicated by
-
WICKET-6870 Wicket complains about component failing to render
- Resolved
- relates to
-
WICKET-6839 Component visible-in-hierarchy cache not used but cleared
- Resolved