Hi,

In our application we have some logic that looks for certain panels and
adds them to ART using ART.addChildren. Problem we face here is: some of
those panels might not be visible or have a  representation of them at
client side. I'm not sure if condition bellow, about using
isVisibleInHierarchy, is bulletproof (or correct) but a helper function as
below seems to get rid of all client side "id not found" warnings. Is this
something we can improve in wicket core?

*public static void *addChildren(IPartialPageRequestHandler target,
MarkupContainer parent, Class<?> childCriteria)
{
Args.*notNull*(parent, *"parent"*);
Args.*notNull*(childCriteria, *"childCriteria"*);

parent.visitChildren(childCriteria, *new *IVisitor<Component, Void>()
{
@Override
*public void *component(*final *Component component, *final *IVisit<Void>
visit)
{
*if *(component.isVisibleInHierarchy()) {
target.add(component);
}
visit.dontGoDeeper();
}
});
}



-- 
Regards - Ernesto Reinaldo Barreiro

Reply via email to