<% List list = (List) tabList_ext;
Iterator iter = list.iterator();
while (iter.hasNext()) {
org.apache.struts.tiles.beans.SimpleMenuItem tab = (org.apache.struts.tiles.beans.SimpleMenuItem) iter.next();
boolean showItem = true;
if (SecurityContext.isSecurityEnabled()) {
showItem = false;
String[] roles = {"administrator", "operator", "configurator", "monitor"};
if (tab.getTooltip() != null && tab.getTooltip().equals("") == false) {
StringTokenizer st = new StringTokenizer(tab.getTooltip(), ",");
ArrayList al = new ArrayList();
while(st.hasMoreTokens()) {
al.add(st.nextToken());
}
roles = new String[al.size()];
roles = (String[])al.toArray(roles);
}
for (int idx = 0; idx < roles.length; idx++) {
if (adminAuthorizer.checkAccess(contextUri, roles[idx])) {
showItem = true;
break;
}
}
}
//skip displaying tab if showItem is false
if (showItem == false) {
continue;
}
String value = (String) perspectiveValue;
String tabValue = tab.getValue();
String href = selectUri + "?EditAction=true&perspective=" + tabValue ;
String managedbeanId = (String) mbeanId;
//skip displaying runtime tab if managedbeanId is blank
if ( (managedbeanId.equalsIgnoreCase("")) && (tabValue.equalsIgnoreCase("tab.runtime")) ) {
continue;
}
%>
<% if (tabList_ext.size() == 1) {
selectedBody = tab.getLink();
%>
|
<% } else if ((tabList_ext.size() > 1) && (value.equalsIgnoreCase(tabValue))) {
selectedBody = tab.getLink();
%>
|
images/onepix.gif" width="2" height="10" align="absmiddle" alt="">
|
<% } else if ((tabList_ext.size() > 1) && (!value.equalsIgnoreCase(tabValue))) { %>
|
images/onepix.gif" width="2" height="10" align="absmiddle" alt="">
|
<% } %>
<% } %>
images/onepix.gif" width="1" height="10" align="absmiddle" alt="">
|