%-- IBM Confidential OCO Source Material --%> <%-- 5724-i63, 5724-H88 (C) COPYRIGHT International Business Machines Corp. 1997, 2011 --%> <%-- The source code for this program is not published or otherwise divested --%> <%-- of its trade secrets, irrespective of what has been deposited with the --%> <%-- U.S. Copyright Office. --%> <%-- @(#) 1.30 WEBUI/ws/code/webui.core/src/adminconsole/secure/layouts/configGenGenericPropLayout.jsp, WAS.webui.core, WASX.WEBUI 5/19/04 08:57:13 [5/24/04 08:09:06] --%> <%@ page import="java.lang.reflect.Method"%> <%@ page import="java.util.*,com.ibm.ws.security.core.SecurityContext"%> <%-- F904.6_20487.14 Removed product --%> <%@ page import="com.ibm.websphere.management.metadata.*"%> <%@ page import="com.ibm.websphere.management.authorizer.*"%> <%@ page import="com.ibm.websphere.management.AdminService"%> <%@ page import="com.ibm.websphere.management.AdminServiceFactory"%> <%@ page import="com.ibm.ws.console.core.selector.*"%> <%@ page import="com.ibm.ws.*"%> <%@ page import="com.ibm.wsspi.*"%> <%@ page import="com.ibm.ws.console.core.ConfigFileHelper"%> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> <%@ taglib uri="/WEB-INF/ibmcommon.tld" prefix="ibmcommon" %> <% String invalidFields = ""; Method methodList[] = cntxt.getClass().getMethods(); for (int i = 0; i < methodList.length; i++) { Method m = methodList[i]; if(m.getName().equals("getInvalidFields")) { %> <% invalidFields = newInvalidFields;%> <% break; } } AdminAuthorizer adminAuthorizer = AdminAuthorizerFactory.getAdminAuthorizer(); String contextUri = ConfigFileHelper.decodeContextUri((String)contextId); if (contextUri==null) { AdminService adminService = AdminServiceFactory.getAdminService(); contextUri = "cells/"+adminService.getCellName(); } %> <% String customTextFieldJspName="/com.ibm.ws.console.gridjobclass/GJCTextFieldLayout.jsp"; String customCheckBoxJspName="/com.ibm.ws.console.gridjobclass/GJCCheckBoxLayout.jsp"; %> <% String contextType=(String)request.getAttribute("contextType"); String cellname = null; String nodename = null; String token = null; java.util.Properties props= null; java.util.ArrayList attributeList_ext = new java.util.ArrayList(); for(int i=0;i0){ if(contextId!=null && contextId!="nocontext"){ props = ConfigFileHelper.getNodeMetadataProperties((String)contextId, request); //213515 //LIDB4138-39 } attributeList_ext = FieldSelector.getFields(extensions,attributeList_ext,props,(String)perspective); } attributeList_ext = FieldSelector.getCategories(extensions,attributeList_ext,(String)perspective); pageContext.setAttribute("attributeList_ext",attributeList_ext); %> <% String renderReadOnlyView = "no"; if( (readOnlyView != null) && (readOnlyView.equalsIgnoreCase("yes")) ) { renderReadOnlyView = "yes"; } else if (SecurityContext.isSecurityEnabled()) { renderReadOnlyView = "yes"; if (request.isUserInRole("administrator")) { renderReadOnlyView = "no"; } else if (request.isUserInRole("configurator")) { renderReadOnlyView = "no"; } } %> <% //Boolean descriptionsOn = (Boolean) session.getAttribute("descriptionsOn"); //String numberOfColumns = "3"; //if (descriptionsOn.booleanValue() == false) // numberOfColumns = "2"; %> <% String fieldLevelHelpTopic = ""; String fieldLevelHelpAttribute = ""; String DETAILFORM = "DetailForm"; String objectType = ""; int index = formType.lastIndexOf ('.'); if (index > 0) { String fType = formType.substring (index+1); if (fType.endsWith (DETAILFORM)) objectType = fType.substring (0, fType.length()-DETAILFORM.length()); else objectType = fType; } fieldLevelHelpTopic = objectType+".detail."; String topicKey = fieldLevelHelpTopic; %> <% // If there's no properties, don't show this section if (attributeList_ext.size() > 0) { %> <% if (propertyLabel.equals("") || propertyLabel==null ) { %> <% } else { %> <% } %> <% if (renderReadOnlyView.equalsIgnoreCase("yes")) { %> <% int propCounterReadOnly = 0; String activeSubhead = ""; %> <%if (item.getCategoryId()!=null) { %> <% if ((!activeSubhead.equals(item.getCategoryId()) && (!activeSubhead.equals(""))) || ((item.getCategoryId().equalsIgnoreCase("general") && propCounterReadOnly!=0))) { %> <% } if(!item.getCategoryId().equalsIgnoreCase("general")){ activeSubhead = item.getCategoryId(); %> <% }else activeSubhead=""; } else { %> <% String showDescription = item.getShowDescription(); fieldLevelHelpAttribute = item.getAttribute(); if (fieldLevelHelpAttribute.equals(" ") || fieldLevelHelpAttribute.equals("")) fieldLevelHelpTopic = item.getLabel(); else fieldLevelHelpTopic = topicKey + fieldLevelHelpAttribute; %> <% if (item.getType().equalsIgnoreCase("jsp")) { %> <% } else if (item.getType().equalsIgnoreCase("Password")) { %> <% } else if (item.getType().equalsIgnoreCase("Custom")){%> <% } else if (item.getType().equalsIgnoreCase("select")) { try { session.removeAttribute("valueVector"); session.removeAttribute("descVector"); } catch (Exception e) { } StringTokenizer st1 = new StringTokenizer(item.getEnumDesc(), ";,"); Vector descVector = new Vector(); while(st1.hasMoreTokens()) { String enumDesc = st1.nextToken(); descVector.addElement(enumDesc); } StringTokenizer st = new StringTokenizer(item.getEnumValues(), ";,"); Vector valueVector = new Vector(); while(st.hasMoreTokens()) { String str = st.nextToken(); valueVector.addElement(str); } session.setAttribute("descVector", descVector); session.setAttribute("valueVector", valueVector); %> <% } else if (item.getType().equalsIgnoreCase("Label")) { %> <% } else {%> <% } %> <% propCounterReadOnly += 1;%> <%}%> <% if (!activeSubhead.equals("")) { %> <% } %> " class="buttons" id="navigation"> <% } %> <% if (renderReadOnlyView.equalsIgnoreCase("no")) { %> <% int propCounter = 0; String activeSubhead = ""; %> <%if (item.getCategoryId()!=null) { %> <% if ((!activeSubhead.equals(item.getCategoryId()) && (!activeSubhead.equals(""))) || ((item.getCategoryId().equalsIgnoreCase("general") && propCounter!=0))) { %> <% } if(!item.getCategoryId().equalsIgnoreCase("general")){ activeSubhead = item.getCategoryId(); %> <% }else activeSubhead=""; } else { %> <% String isRequired = item.getRequired(); String strType = item.getType(); String isReadOnly = item.getReadOnly(); String showDescription = item.getShowDescription(); fieldLevelHelpAttribute = item.getAttribute(); if (fieldLevelHelpAttribute.equals(" ") || fieldLevelHelpAttribute.equals("")) fieldLevelHelpTopic = item.getLabel(); else fieldLevelHelpTopic = topicKey + fieldLevelHelpAttribute; %> <% if (strType.equalsIgnoreCase("Label")) { %> <% } %> <% if (strType.equalsIgnoreCase("Link")) { %> <% } %> <% if (strType.equalsIgnoreCase("Text")) { %> <% } %> <% if (strType.equalsIgnoreCase("TextMedium")) { %> <% } %> <% if (strType.equalsIgnoreCase("TextLong")) { %> <% } %> <% if (strType.equalsIgnoreCase("TextArea")) { %> <% } %> <% if (strType.equalsIgnoreCase("Checkbox")) { %> <% } %> <% if (strType.equalsIgnoreCase("Password")) { %> <% } %> <% if (strType.equalsIgnoreCase("jsp")) { %> <% } %> <% if (strType.equalsIgnoreCase("Custom")) { %> <% } %> <% if (strType.equalsIgnoreCase("CustomCheckBox")) { %> <% } %> <% if (strType.equalsIgnoreCase("CustomTextField")) { %> <% } %> <% if (strType.equalsIgnoreCase("select")) { try { session.removeAttribute("valueVector"); session.removeAttribute("descVector"); } catch (Exception e) { } StringTokenizer st1 = new StringTokenizer(item.getEnumDesc(), ";,"); Vector descVector = new Vector(); while(st1.hasMoreTokens()) { String enumDesc = st1.nextToken(); descVector.addElement(enumDesc); } StringTokenizer st = new StringTokenizer(item.getEnumValues(), ";,"); Vector valueVector = new Vector(); while(st.hasMoreTokens()) { String str = st.nextToken(); valueVector.addElement(str); } session.setAttribute("descVector", descVector); session.setAttribute("valueVector", valueVector); %> <% } %> <% propCounter += 1;%> <%}%> <% if (!activeSubhead.equals("")) { %> <% } %> <%if (showButtons.equalsIgnoreCase("true")); { %> " class="buttons_navigation"> " class="buttons_navigation"> " class="buttons_navigation" onclick="resetTextFields()"> " class="buttons_navigation"> <%}%> <% } %> <% } %>