I did something in the order of what you suggested:
Created a new AjaxRequestTarget sub class
public class MyAjaxRequestTarget extends AjaxRequestTarget {
....
public void addComponent(Component component) {
super.addComponent(component);
// see if this component has related components that are
interesting in being
// ajax refreshed when this component is refreshed.
if (component instanceof IHasRelatedAjaxComponent) {
List<Component> relatedComponentList =
((IHasRelatedAjaxComponent) component).getRelatedAjaxComponents();
if (relatedComponentList != null &&
!relatedComponentList.isEmpty()) {
for (Component c : relatedComponentList) {
// add only if the new component is not in the hierarchy
if (!getComponents().contains(c)) {
addComponent(c);
}
}
}
}
}
Any feedback from the list is welcome!
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]