I have a HTML element which is hidden if its contained Wicket component foo is invisible.
<span class="ig" wicket:enclosure="foo">
<span class="iga">
<span wicket:id="foo"/>
</span>
</span>
Now I have to add a second Wicket component bar and the enclosure should only show up if foo or bar are visible. Something like this:
<span class="ig" wicket:enclosure="foo-or-bar???">
<span class="iga">
<span wicket:id="foo"/>
<span wicket:id="bar"/>
</span>
</span>
But how? One complication is, that the visibility of the components can change by AJAX events.