FWIW, I had to make an update to AjaxAwareModel and AjaxModelAware.
AjaxModelAware now returns a boolean, which signifies whether the
AjaxAwareModel should continue to traverse deeper in the hierarchy. If the
parent component intends to re-render or replace its children (such as in
the case where it contains a refreshingview which will recreate all
children), and therefore does not want its children to add themselves to the
ajaxrequesttarget, then it should return false to stop deeper traversal.
New visitor in AjaxAwareModel:
page.visitChildren(new IVisitor(){
public Object component(Component component) {
if( component instanceof AjaxModelAware
){
log.debug("...Notifying: " +
component.getClassRelativePath() );
if(
((AjaxModelAware)component).notifyModelChanged(target,
AjaxAwareModel.this) )
return
CONTINUE_TRAVERSAL;
}
return
CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
}
});
New method signature in AjaxModelAware:
public boolean notifyModelChanged(AjaxRequestTarget target, AjaxAwareModel
model);
--
View this message in context:
http://www.nabble.com/Updating-distant-%28unrelated%29-components-via-Ajax-when-a-shared-model-changes-tf4610276.html#a13192400
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]