*/
for (int i = 0; i < tab.getElements().size(); i++) {
DialogElement curElement = tab.getElements().get(i);
if (curElement instanceof TabbableDialogElement) {
LogSingleton.getInstance().debug("Tabbable widget found " + curElement.getFieldName());
TabbableDialogElement curTabbableElement = (TabbableDialogElement) curElement;
LogSingleton.getInstance().debug("Is Tab? " + curTabbableElement.isTab());
if (curTabbableElement.isTab()) {
if (i != 0 || tab.getElements().size() != 1) {
throw new InvalidComponentFieldException(
"A Tab dialog element can not be placed inside another tab.");
}
curTabbableElement.setTitle(tab.getTitle());
return curElement;
}
}
}