use of com.sun.web.ui.model.CCNavNode in project OpenAM by OpenRock.
the class ServerEditAdvancedViewBean method createTabModel.
protected void createTabModel(String serverName) {
AMViewConfig amconfig = AMViewConfig.getInstance();
tabModel = amconfig.getTabsModel(ServerEditViewBeanBase.TAB_NAME, "/", getRequestContext().getRequest());
if (serverName.equals(ServerConfiguration.DEFAULT_SERVER_CONFIG)) {
CCNavNode node = (CCNavNode) tabModel.getNodeById(425);
tabModel.removeNode(node);
}
registerChild(TAB_COMMON, CCTabs.class);
}
use of com.sun.web.ui.model.CCNavNode in project OpenAM by OpenRock.
the class GenericAgentProfileViewBean method createTabModel.
protected void createTabModel() {
String agentType = getAgentType();
if (isLocalConfig(agentType)) {
agentType = AgentsViewBean.AGENT_2_2;
}
if (agentType != null) {
super.createTabModel();
AgentsModel model = (AgentsModel) getModel();
AgentTabManager mgr = AgentTabManager.getInstance();
List tabs = mgr.getTabs(agentType);
if ((tabs != null) && !tabs.isEmpty()) {
for (int i = 0; i < tabs.size(); i++) {
String tabName = (String) tabs.get(i);
tabModel.addNode(new CCNavNode(Integer.parseInt(TAB_PREFIX + i), model.getLocalizedString("tab.label." + agentType + "." + tabName), "", ""));
}
} else {
tabModel.addNode(new CCNavNode(TAB_GENERAL_ID, "tab.general", "", ""));
}
String group = (String) getPageSessionAttribute(IS_GROUP);
if ((group != null) && group.equals("true")) {
tabModel.addNode(new CCNavNode(TAB_GROUP_ID, "tab.group", "", ""));
}
}
}
use of com.sun.web.ui.model.CCNavNode in project OpenAM by OpenRock.
the class MAPClientManagerViewBean method createTab.
private View createTab(String name) {
CCTabsModel tabModel = new CCTabsModel();
MAPServiceModel model = (MAPServiceModel) getModel();
Set profileNames = model.getProfileNames();
if ((profileNames != null) && !profileNames.isEmpty()) {
for (Iterator iter = profileNames.iterator(); iter.hasNext(); ) {
String val = (String) iter.next();
tabModel.addNode(new CCNavNode(val.hashCode(), val, val, val));
}
tabModel.setSelectedNode(getProfileName().hashCode());
}
return new CCTabs(this, tabModel, name);
}
use of com.sun.web.ui.model.CCNavNode in project OpenAM by OpenRock.
the class AMViewConfig method getTabsModel.
public CCTabsModel getTabsModel(String type, String realmName, HttpServletRequest req) {
CCTabsModel tabModel = new CCTabsModel();
AccessControlModel model = new AccessControlModelImpl(req);
List tabs = getTabList(type);
if ((tabs == null) || tabs.isEmpty()) {
return null;
}
for (Iterator iter = tabs.iterator(); iter.hasNext(); ) {
AMTabEntry entry = (AMTabEntry) iter.next();
CCNavNode navNode = entry.getNavNode(model, realmName);
if (navNode != null) {
tabModel.addNode(navNode);
}
}
return tabModel;
}
use of com.sun.web.ui.model.CCNavNode in project OpenAM by OpenRock.
the class AMViewConfig method getSAMLv2TabsModel.
// all tabs for SAMLv2 property page are predefined in fmConsoleConfiguration.xml.
//here unwanted tabs are hidden based on the role of the respective entity.
public CCTabsModel getSAMLv2TabsModel(String type, String realmName, HttpServletRequest req, List tabsToDisplay) {
CCTabsModel tabModel = new CCTabsModel();
AccessControlModel model = new AccessControlModelImpl(req);
List tabs = getTabList(type);
if ((tabs == null) || tabs.isEmpty()) {
return null;
}
for (Iterator iter = tabs.iterator(); iter.hasNext(); ) {
AMTabEntry entry = (AMTabEntry) iter.next();
for (Iterator tab_iter = tabsToDisplay.iterator(); tab_iter.hasNext(); ) {
String roletoDisplay = (String) tab_iter.next();
if (entry.getViewBean().contains(roletoDisplay)) {
CCNavNode navNode = entry.getNavNode(model, realmName);
if (navNode != null) {
tabModel.addNode(navNode);
}
}
}
}
return tabModel;
}
Aggregations