public void visitTabs() {
List<TabItem> tabs = createLinkedList();
for (String fn : getAvailableFunctions().keySet()) {
TabItem tab = new TabItem(getAvailableFunctions().get(fn));
tab.setHref(link(currentContextName, fn));
tab.setSelected(fn.equals(currentFunctionName));
tabs.add(tab);
// root context
TabItem subtab = new TabItem("Root Context");
subtab.setHref(link(null, fn));
subtab.setSelected(currentContextName == null);
tab.addSubTab(subtab);
// all sub-contexts
for (String contextName : getWebxComponents().getComponentNames()) {
subtab = new TabItem(contextName);
subtab.setHref(link(contextName, fn));
subtab.setSelected(contextName.equals(currentContextName));
tab.addSubTab(subtab);
}
}
tabsComponent.visitTemplate(context, tabs);