use of com.sun.web.ui.model.CCNavNode in project OpenAM by OpenRock.
the class AMViewConfig method addSessionTabs.
public CCTabsModel addSessionTabs(CCTabsModel tabModel, AMModel model) {
if (tabModel == null) {
tabModel = new CCTabsModel();
}
CCNavNode sessionNode = (CCNavNode) tabModel.getNodeById(AMAdminConstants.SESSIONS_NODE_ID);
if (sessionNode != null) {
if ((tabs == null) || (tabs.isEmpty()) || (sessionNode.getChildren() == null) || (sessionNode.getChildren().size() >= 2)) {
return tabModel;
}
AMTabEntry[] entries = new AMTabEntry[2];
entries[0] = (AMTabEntry) sessionNode.getChildren().get(0);
entries[1] = (AMTabEntry) sessionNode.getChildren().get(1);
for (AMTabEntry entry : entries) {
sessionNode.addChild(new CCNavNode(entry.getID(), entry.getLabel(), entry.getTooltip(), entry.getStatus()));
}
}
return tabModel;
}
Aggregations