}
private void refreshComponent(final AjaxRequestTarget target, Component targetComponent)
{
// Refresh this field. We have to find the parent Field to do this.
MarkupContainer field;
if (targetComponent instanceof Field) {
field = (MarkupContainer)targetComponent;
}
else {
field = targetComponent.findParent(AbstractField.class);
}
if (field != null) {
if (!field.getRenderBodyOnly()) {
target.addComponent(field);
}
else {
// Field is RenderBodyOnly, have to add children individually
field.visitChildren( new IVisitor<Component>() {
public Object component(Component component)
{
if (!component.getRenderBodyOnly()) {
target.addComponent(component);
}