Edit D:\app\Administrator\product\11.2.0\dbhome_1\oc4j\j2ee\oc4j_applications\applications\em\em\database\security\eus\eusadditionalsubcomponents.jsp
<%@ include file="/sdk/oemTop.jspf" %> <%@ include file="/oemNoscript.jspf" %> <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix"%> <%@ taglib uri="http://xmlns.oracle.com/oem/jsp/tag" prefix="oem"%> <%@ page import="oracle.sysman.emSDK.util.jdk.NLSUtil"%> <%@ page import="oracle.cabo.ui.data.BundleDataObject"%> <%@ page import="oracle.sysman.emSDK.util.jdk.NLSUtil"%> <%@ page import="oracle.sysman.db.rsc.sec.EUSMsg"%> <%@ page import="oracle.cabo.ui.data.BundleDataObject"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSConstants"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSSubComponentsDataSourceConstants"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSSubComponentsDataSource"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSComponent"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSComponentType"%> <%@ page import="oracle.sysman.emo.adm.security.eus.EUSSubComponentType"%> <%@ page import="java.util.ResourceBundle"%> <%@ page import="java.util.Map"%> <%@ page import="java.util.Set"%> <%@ page import="java.util.List"%> <%@ page import="java.util.HashMap"%> <%@ page import="java.util.Iterator"%> <%@ page import="oracle.sysman.emo.util.UIXDataSource"%> <%@ page import="oracle.sysman.db.adm.ParameterNames"%> <% EUSSubComponentType selectedSubComponentType=(EUSSubComponentType)request.getAttribute(EUSConstants.SUB_COMPONENT_TYPE); //EUSComponentType componentType = ((EUSComponent)request.getAttribute(EUSConstants.EUS_COMPONENT_CACHED_OBJECT)).getType(); EUSComponentType componentType = (EUSComponentType)request.getAttribute(EUSConstants.EUS_COMPONENT_TYPE); int iEUSComponentType=componentType.getType(); int iEUSSubCompType=selectedSubComponentType.getType(); ResourceBundle eusBundle=NLSUtil.getBundle(EUSMsg.class.getName(), request); String sFormDestinationURL=(String)request.getAttribute(EUSConstants.EUS_BASE_URL_TO_COMPONENT); String sFinalUrl=request.getContextPath()+sFormDestinationURL+"&event="+EUSConstants.EUS_ADD_SUB_COMPONENT ; String dbVersion = (String)request.getAttribute("DBVERSION"); String sInstructionText=""; String sPageTitle=""; String sFormURL=""; String sSearchURL=request.getContextPath()+sFormDestinationURL+"&event="+EUSConstants.EUS_GET_ADDITIONAL_SUB_COMPONENTS; String sEvent=""; if(request.getAttribute("SUB_COMPONENT_EVENT") != null) { sEvent=(String)request.getAttribute("SUB_COMPONENT_EVENT"); sFinalUrl=request.getContextPath()+sFormDestinationURL+"&event="+sEvent+"&subevent=add"; sSearchURL=request.getContextPath()+sFormDestinationURL+"&event="+sEvent+"&subevent=fetchadditional"; } try { sPageTitle=eusBundle.getString("PAGE_TITLE_FOR_ADD_IN_SUBCOMP_"+iEUSSubCompType+"_IN_COMP_"+iEUSComponentType); sInstructionText=eusBundle.getString("INS_TEXT_FOR_ADD_IN_SUBCOMP_"+iEUSSubCompType+"_IN_COMP_"+iEUSComponentType); } catch(Exception e) { } String sCurrentJSP="/database/security/eus/eusadditionalsubcomponents"; String sJSFunction="submitMainForm('"+sFinalUrl+"')"; String sSearchJSFunction="submitCurrentForm('"+sSearchURL+"')"; %> <uix:renderingContext id="renderingContext"> <oem:setURLEncoder id="renderingContext"/> <uix:bundle name="dbMsgs" class="oracle.sysman.db.rsc.DBObjectMsg"/> <uix:bundle name="olsMsgs" class="oracle.sysman.db.rsc.sec.OLSOIDMsg"/> <uix:bundle name="eusMsgs" class="oracle.sysman.db.rsc.sec.EUSMsg"/> <uix:document> <%@ include file="/oemTitle.jspf" %> <uix:metaContainer> <uix:head title="<%=sPageTitle%>"/> </uix:metaContainer> <uix:body> <uix:form name="form0" method="POST" destination="<%=sFormDestinationURL%>"> <uix:formValue name="<%=ParameterNames.PAGE_NAME%>" value="<%=sCurrentJSP%>"/> <uix:formValue name="<%=EUSConstants.SUB_COMPONENT_TYPE%>" value="<%=iEUSSubCompType%>" /> <uix:formValue name="<%=EUSConstants.EUS_COMPONENT_TYPE%>" value="<%=iEUSComponentType%>" /> <uix:formValue name="SUB_COMPONENT_EVENT" value="<%=sEvent%>"/> <oem:messageBox messageType="error" errorTableBinding="errors@servletRequest" titleTextKey="titleText" mainTextKey="mainText"/> <uix:script text="function cancel() { top.close(); } function submitCurrentForm(sSearchURL) { document.forms[0].action=sSearchURL; document.forms[0].submit(); } function submitMainForm(sFinalUrl) { var iNumberOfCheckBoxes=0; var iCheckBoxCount=0; var sCheckBoxNamePrefix='additionalsubcomponents:selected:'; var sToBeAddedSubComponentsIndexes=''; var iSelectedCheckBoxCount=0; for(var i=0;i<document.forms[0].elements.length;i++) { var sElemenetName=document.forms[0].elements[i].name; var sCheckBoxName=sCheckBoxNamePrefix+iCheckBoxCount; if(sCheckBoxName==sElemenetName) { if(document.forms[0].elements[i].checked) { if(iSelectedCheckBoxCount==0) { sToBeAddedSubComponentsIndexes=document.forms[0].elements[i].value; } else { sToBeAddedSubComponentsIndexes = sToBeAddedSubComponentsIndexes + ',' + document.forms[0].elements[i].value; } iSelectedCheckBoxCount++; } iCheckBoxCount++; } } top.window.opener.document.forms[0].ToBeAddedSubComponentsIndexes.value=sToBeAddedSubComponentsIndexes; top.window.opener.document.forms[0].action=sFinalUrl; top.window.opener.document.forms[0].submit(); top.close(); }" /> <uix:pageLayout title="<%=sPageTitle%>"> <uix:tableLayout width="100%" cellPadding="1" cellSpacing="1"> <uix:rowLayout hAlign="right"> <uix:cellFormat columnSpan="2"> <uix:pageButtonBar> <uix:contents> <uix:button text="<%=eusBundle.getString(\"EUS_CANCEL_TEXT\")%>" shortDesc="<%=eusBundle.getString(\"EUS_CANCEL_TEXT\")%>" onClick="cancel()"/> <uix:button text="<%=eusBundle.getString(\"EUS_SELECT_TEXT\")%>" shortDesc="<%=eusBundle.getString(\"EUS_SELECT_TEXT\")%>" onClick="<%=sJSFunction%>"/> </uix:contents> </uix:pageButtonBar> </uix:cellFormat> </uix:rowLayout> <uix:rowLayout> <uix:cellFormat columnSpan="2"> <uix:formattedText styleUsage="instruction" text="<%=sInstructionText%>" /> </uix:cellFormat> </uix:rowLayout> <% if(request.getAttribute("ADDITIONAL_COMPONENTS_SEARCH_PROPERTIES") != null) { Map additionalSearchProperties=(Map)request.getAttribute("ADDITIONAL_COMPONENTS_SEARCH_PROPERTIES"); Map additionalSearchPropertiesValue=new HashMap(); if(request.getAttribute("ADDITIONAL_COMPONENTS_SEARCH_PROPERTIES_VALUE") != null) additionalSearchPropertiesValue=(Map)request.getAttribute("ADDITIONAL_COMPONENTS_SEARCH_PROPERTIES_VALUE"); Set keySet=additionalSearchProperties.keySet(); Iterator iterator=keySet.iterator(); while(iterator.hasNext()) { String sKey=(String)iterator.next(); Object obj=additionalSearchProperties.get(sKey); Object objValue=""; if(additionalSearchPropertiesValue != null && additionalSearchPropertiesValue.get(sKey) != null) objValue=additionalSearchPropertiesValue.get(sKey); if(obj instanceof java.util.List) { %> <uix:rowLayout> <uix:cellFormat> <uix:styledText styleClass="OraInstructionText" text="<%=eusBundle.getString(sKey)%>" labeledNodeId="<%=sKey%>"/> </uix:cellFormat> <uix:cellFormat> <uix:messageChoice id="<%=sKey%>" name="<%=sKey%>" shortDesc="<%=eusBundle.getString(sKey)%>"> <uix:contents> <% List databases=(List)obj; for(int i=0;i<databases.size();i++) { String sDatabase=(String)databases.get(i); String sSelected="false"; if(objValue.toString().equalsIgnoreCase(sDatabase)) sSelected="true"; %> <uix:option text="<%=sDatabase%>" value="<%=sDatabase%>" selected="<%=sSelected%>" shortDesc="<%=sDatabase%>" /> <% } %> </uix:contents> </uix:messageChoice> </uix:cellFormat> </uix:rowLayout> <% } else if(obj instanceof java.lang.String && String.valueOf(obj).equals("PASSWORD")) { %> <uix:rowLayout > <uix:cellFormat> <uix:styledText styleClass="OraInstructionText" text="<%=eusBundle.getString(sKey)%>" labeledNodeId="<%=sKey%>"/> </uix:cellFormat> <uix:cellFormat> <uix:textInput id="<%=sKey%>" name="<%=sKey%>" required="uiOnly" shortDesc="<%=eusBundle.getString(sKey)%>" secret="true" noAutoComplete="true" /> </uix:cellFormat> </uix:rowLayout> <% } else if(obj instanceof java.lang.String && String.valueOf(obj).equals("%")) { String valVal=""; if(objValue != null && String.valueOf(objValue).equals("")==false) valVal=String.valueOf(objValue); else valVal=String.valueOf(obj); %> <uix:rowLayout > <uix:cellFormat> <uix:styledText styleClass="OraInstructionText" text="<%=eusBundle.getString(sKey)%>" labeledNodeId="<%=sKey%>"/> </uix:cellFormat> <uix:cellFormat> <uix:textInput id="<%=sKey%>" name="<%=sKey%>" required="uiOnly" text="<%=valVal%>" shortDesc="<%=eusBundle.getString(sKey)%>" onKeyPress="if(_getKC(event)==13) return false; else return true;" /> </uix:cellFormat> </uix:rowLayout> <% } else if(obj==null) { %> <uix:rowLayout > <uix:cellFormat> <uix:styledText styleClass="OraInstructionText" text="<%=eusBundle.getString(sKey)%>" labeledNodeId="<%=sKey%>" /> </uix:cellFormat> <uix:cellFormat> <uix:textInput id="<%=sKey%>" name="<%=sKey%>" required="uiOnly" text="<%=objValue%>" shortDesc="<%=eusBundle.getString(sKey)%>" onKeyPress="if(_getKC(event)==13) return false; else return true;" /> </uix:cellFormat> </uix:rowLayout> <% } } %> <uix:rowLayout > <uix:cellFormat> <uix:spacer /> </uix:cellFormat> <uix:cellFormat> <uix:button onClick="<%=sSearchJSFunction%>" text="<%=eusBundle.getString(\"EUS_SEARCH_TEXT\")%>" shortDesc="<%=eusBundle.getString(\"EUS_SEARCH_TEXT\")%>"/> </uix:cellFormat> </uix:rowLayout> <% } %> <uix:rowLayout> <uix:cellFormat columnSpan="2"> <uix:dataScope currentDataBinding="EUS_ADDITIONAL_SUB_COMPONENTS_DATASOURCE@servletRequest"> <uix:table name="additionalsubcomponents" alternateTextBinding="EUS_NO_ITEMS_FOUND_TEXT@eusMsgs" width="100%" tableDataBinding="rowData" minValue="1" formSubmitted="true" valueBinding="<%= UIXDataSource.S_START_INDEX_ATTR %>" blockSizeBinding="<%= UIXDataSource.S_BLOCK_SIZE_ATTR %>" maxValueBinding="<%= UIXDataSource.S_NUM_ROWS_ATTR %>" shortDesc="" summary=""> <uix:tableFormat tableBanding="rowBanding"/> <% int iColCount = ((Integer)((Map)EUSSubComponentsDataSourceConstants.NUM_COLS_EUS_SUBCOMPONENT.get(EUSSubComponentsDataSourceConstants.NUM_COLS_EUS_SUBCOMPS_IN_COMP_STR+componentType.getType())).get(EUSSubComponentsDataSourceConstants.NUM_COLS_EUS_SUB_COMP_STR+selectedSubComponentType.getType())).intValue(); if(selectedSubComponentType.getType() == 105){ iColCount = 2; } else { iColCount=1; } for(int i=0;i<iColCount;i++) { String sDisplayNameKey="SUBCOMP_"+selectedSubComponentType.getType()+"_COMP_"+iEUSComponentType+"_COL"+i; String sDisplayName = eusBundle.getString(sDisplayNameKey); %> <uix:column> <uix:columnHeader> <uix:sortableHeader text="<%=sDisplayName%>" sortable="true"/> </uix:columnHeader> <uix:columnFormat columnDataFormat="textFormat" /> <uix:styledText textBinding="<%=sDisplayNameKey%>" /> </uix:column> <% } %> <uix:tableSelection> <uix:multipleSelection textBinding="EUS_SELECT_TEXT@eusMsgs" shortDescBinding="EUS_SELECT_TEXT@eusMsgs"> </uix:multipleSelection> </uix:tableSelection> </uix:table> </uix:dataScope> </uix:cellFormat> </uix:rowLayout> <uix:rowLayout hAlign="right"> <uix:cellFormat columnSpan="2"> <uix:pageButtonBar> <uix:contents> <uix:button text="<%=eusBundle.getString(\"EUS_CANCEL_TEXT\")%>" shortDesc="<%=eusBundle.getString(\"EUS_CANCEL_TEXT\")%>" onClick="cancel()"/> <uix:button text="<%=eusBundle.getString(\"EUS_SELECT_TEXT\")%>" shortDesc="<%=eusBundle.getString(\"EUS_SELECT_TEXT\")%>" onClick="<%=sJSFunction%>"/> </uix:contents> </uix:pageButtonBar> </uix:cellFormat> </uix:rowLayout> </uix:tableLayout> </uix:pageLayout> </uix:form> </uix:body> </uix:document> </uix:renderingContext>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de