Search in sources :

Example 11 with CCNavNode

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;
}
Also used : CCTabsModel(com.sun.web.ui.model.CCTabsModel) CCNavNode(com.sun.web.ui.model.CCNavNode)

Aggregations

CCNavNode (com.sun.web.ui.model.CCNavNode)11 Iterator (java.util.Iterator)6 CCTabsModel (com.sun.web.ui.model.CCTabsModel)5 List (java.util.List)5 OptionList (com.iplanet.jato.view.html.OptionList)4 ArrayList (java.util.ArrayList)4 NodeList (org.w3c.dom.NodeList)4 AMViewConfig (com.sun.identity.console.base.AMViewConfig)2 AccessControlModel (com.sun.identity.console.base.model.AccessControlModel)2 AccessControlModelImpl (com.sun.identity.console.base.model.AccessControlModelImpl)2 Set (java.util.Set)2 AgentsModel (com.sun.identity.console.agentconfig.model.AgentsModel)1 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)1 EntitiesModel (com.sun.identity.console.idm.model.EntitiesModel)1 MAPServiceModel (com.sun.identity.console.service.model.MAPServiceModel)1 IdType (com.sun.identity.idm.IdType)1 CCTabs (com.sun.web.ui.view.tabs.CCTabs)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1