Description
Consider this example:
<wicket:enclosure child="invisible">
This entire enclosure should be hidden.
<p wicket:id="invisible"></p>
<p wicket:id="shouldntrendereither"></p>
</wicket:enclosure>
If the "invisible" component is indeed invisible, then the entire enclosure is also invisible. Furthermore this implies that none of the components within the enclosure will be rendered. However this is not the case. Even though the "shouldntrendereither"
component is in the same enclosure and therefore should not be rendered, Wicket attempts to render it.
This was not the case in Wicket 1.4.x.
See the attached quickstart.
This is a serious problem for two reasons:
1. For performance, it does not make sense to render components, and therefore potentially load model objects from the database, etc. if those components are ultimately not being displayed.
2. In my experience, <wicket:enclosure> is used to hide components that would otherwise fail to render, due to non-existent data or unauthorized access. Pages that have been built under the assumption that hidden components are not rendered (a very reasonable assumption) may now fail with exceptions in Wicket 1.5.