* @see org.olat.core.gui.control.generic.dtabs.Activateable#activate(org.olat.core.gui.UserRequest,
* java.lang.String)
*/
public void activate(UserRequest ureq, String viewIdentifier) {
// viewIdentifier contains key of tab to be activated
TabbedPane myTabbedPane = getTabbedPane();
Translator translator = getTranslator();
String[] paneKeys = getPaneKeys();
if (myTabbedPane == null) { throw new OLATRuntimeException("tabs not yet added!", new IllegalStateException()); }
boolean foundKey = false;
if (paneKeys.length > 0) {
int i = 0;
while (!foundKey && i<paneKeys.length) {
foundKey = viewIdentifier.equals(paneKeys[i]);
i++;
}
}
if (foundKey) {
// it is a tab which we know
myTabbedPane.setSelectedPane(translator.translate(viewIdentifier));
} else {
// it may be a tab of our children
ActivateableTabbableDefaultController[] children = getChildren();
for (int j = 0; j < children.length; j++) {
children[j].activate(ureq, viewIdentifier);