if (component instanceof MarkupContainer)
{
MarkupContainer container = (MarkupContainer)component;
// collect feedback
container.visitChildren(IFeedback.class, new IVisitor()
{
public Object component(Component component)
{
((IFeedback)component).updateFeedback();
return IVisitor.CONTINUE_TRAVERSAL;
}
});
}
if (component instanceof IFeedback)
{
((IFeedback)component).updateFeedback();
}
}
// we need to attach feedback components here because they are not
// attached in MarkupContainer#attachChildren()
it = markupIdToComponent.values().iterator();
while (it.hasNext())
{
final Component component = (Component)it.next();
if (component instanceof IFeedback)
{
component.attach();
}
if (component instanceof MarkupContainer)
{
MarkupContainer container = (MarkupContainer)component;
// collect feedback
container.visitChildren(IFeedback.class, new IVisitor()
{
public Object component(Component component)
{
component.attach();
return IVisitor.CONTINUE_TRAVERSAL;