}
protected void controlTabs()
{
SiteTreeNode node = getUserSelectedNode();
TabbedPanel tabs = (TabbedPanel) get("tabs");
tabs.getTabs().clear();
ITab tempTab;
tempTab = new AbstractTab(new Model("Information"))
{
public Panel getPanel(String panelId)
{
return new InformationTab(panelId, document);
}
};
tabs.getTabs().add(tempTab);
tempTab = new AbstractTab(new Model("Metadata"))
{
public Panel getPanel(String panelId)
{
return new MetaDataTab(panelId, document);
}
};
tabs.getTabs().add(tempTab);
tempTab = new AbstractTab(new Model("Security"))
{
public Panel getPanel(String panelId)
{
return new SecurityTab(panelId, document);
}
};
tabs.getTabs().add(tempTab);
if (node.getDocType().equals(FileType.Folder))
{
tempTab = new AbstractTab(new Model("Document ordering"))
{
public Panel getPanel(String panelId)
{
return new DocumentOrderingTabPanel(panelId, document);
}
};
tabs.getTabs().add(tempTab);
}
if (node.getDocType().equals(FileType.Folder)
|| node.getDocType().equals(FileType.Page))
{
tempTab = new AbstractTab(new Model("Menus"))
{
public Panel getPanel(String panelId)
{
return new MenuTabPanel(panelId, document);
}
};
tabs.getTabs().add(tempTab);
}
tempTab = new AbstractTab(new Model("Import/Export"))
{
public Panel getPanel(String panelId)
{
return new ImportDataTab(panelId, document);
}
};
tabs.getTabs().add(tempTab);
tabs.setSelectedTab(0);
}