// TODO this is where I wish we had something like "enum(TAG, BODY, NONE, ALL) isVisible()"
// set the enclosure visibility
boolean visible = childComponent.determineVisibility();
// We want to know which components are rendered inside the enclosure
final IComponentOnAfterRenderListener listener = new EnclosureListener(this);
try
{
// register the listener
getApplication().getComponentOnAfterRenderListeners().add(listener);