throw new UiException("Page is already covered by another Data Binder. Cannot be covered by this Data Binder again. Page:"+page.getId());
} else {
page.setAttribute(_name, _binder);
}
} else if (_compPath.startsWith("/")) { //absolute path
final Component comp = Path.getComponent(_compPath);
if (comp == null) {
throw new UiException("Cannot find the specified component. Absolute Path:"+_compPath);
}
_binder = new AnnotateDataBinder(comp, b);
saveBinder(comp);//comp.setAttribute(_name, _binder);
} else if (_compPath.startsWith("./") || _compPath.startsWith("../")) { //relative path
for (int j = 0; j < comps.length; ++j) {
final Component vroot = comps[j];
final Component comp = Path.getComponent(vroot.getSpaceOwner(), _compPath);
if (comp != null) { //found
_binder = new AnnotateDataBinder(comp, b);
saveBinder(comp);//comp.setAttribute(_name, _binder);
break;
}
}
if (_binder == null) {
throw new UiException("Cannot find the specified component. Relative Path:"+_compPath);
}
} else {
final Component comp = page.getFellow(_compPath);
_binder = new AnnotateDataBinder(comp, b);
saveBinder(comp);//comp.setAttribute(_name, _binder);
}
_binder.loadAll(); //load data bean properties into UI components
}