Avoiding to load first tab

This commit is contained in:
Óscar González Fernández 2009-12-05 19:35:56 +01:00
parent 7923679131
commit 472d208b32
2 changed files with 4 additions and 3 deletions

View file

@ -47,16 +47,15 @@ public class TabSwitcher extends HtmlMacroComponent {
private void addTabsFromComfiguration(TabsConfiguration configuration) {
container.getChildren().clear();
tabsRegistry = new TabsRegistry(container);
IMenuItemsRegister menu = getMenuItemsRegisterLocator().retrieve();
configuration.applyTo(tabsRegistry, menu);
tabsRegistry.showFirst();
}
@Override
public void afterCompose() {
super.afterCompose();
container = getFellow("container");
tabsRegistry = new TabsRegistry(container);
if (configuration != null) {
addTabsFromComfiguration(configuration);
}

View file

@ -208,7 +208,9 @@ public class MultipleTabsPlannerController implements Composer,
tabsSwitcher.setConfiguration(buildTabsConfiguration());
final URLHandler<IGlobalViewEntryPoints> handler = registry
.getRedirectorFor(IGlobalViewEntryPoints.class);
handler.applyIfMatches(this);
if (!handler.applyIfMatches(this)) {
goToCompanyScheduling();
}
handler.registerListener(this, comp.getPage());
}