| <!-- | |
| Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. | |
| This program and the accompanying materials are made available under the | |
| terms of the Eclipse Public License v. 2.0, which is available at | |
| http://www.eclipse.org/legal/epl-2.0. | |
| This Source Code may also be made available under the following Secondary | |
| Licenses when the conditions for such availability set forth in the | |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | |
| version 2 with the GNU Classpath Exception, which is available at | |
| https://www.gnu.org/software/classpath/license.html. | |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | |
| --> | |
| <!-- jca/jcaResourceNew.jsf --> | |
| <!initPage | |
| setResourceBundle(key="i18njca" bundle="org.glassfish.jca.admingui.Strings"); | |
| setResourceBundle(key="help_jca" bundle="org.glassfish.jca.admingui.Helplinks") | |
| /> | |
| <!composition template="/templates/default.layout" guiTitle="$resource{i18njca.resourceAdapterConfig.newPageTitle}" | |
| guiOnLoad="enableRadioButtonFields('#{myOption}');"> | |
| <!define name="content"> | |
| <event> | |
| <!beforeCreate | |
| setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/jca/resourceAdapterConfigNew.jsf"); | |
| setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/jca/resourceAdapterConfigs.jsf"); | |
| setPageSessionAttribute(key="childType" value="resource-adapter-config"); | |
| setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/resources"); | |
| setPageSessionAttribute(key="rest-api" value="true"); | |
| gf.getEntityAttrs( endpoint="#{pageSession.parentUrl}/#{pageSession.childType}" valueMap="#{pageSession.valueMap}") | |
| //set the following for including buttons.inc | |
| setPageSessionAttribute(key="edit" value="#{false}" ); | |
| getRequestValue(key="name" value="#{pageSession.Name}"); | |
| getRequestValue(key="nameText" value="#{pageSession.nameText}"); | |
| getRequestValue(key="myOption" value="#{pageSession.myOption}"); | |
| if (!#{pageSession.myOption}) { | |
| setPageSessionAttribute(key="myOption" value="dropdown"); | |
| } | |
| createMap(result="#{pageSession.attrsMap}"); | |
| if ("#{pageSession.Name}&(#{pageSession.myOption}=dropdown)") { | |
| mapPut(map="#{pageSession.attrsMap}" key="rarName" value="#{pageSession.Name}"); | |
| mapPut(map="#{pageSession.valueMap}" key="name" value="#{name}"); | |
| } | |
| if ("#{pageSession.Name}&(#{pageSession.myOption}=text)") { | |
| setPageSessionAttribute(key="nameDropDown" value="#{pageSession.Name}"); | |
| } | |
| if ("!#{pageSession.Name}&(#{pageSession.myOption}=dropdown)") { | |
| if (#{sessionScope._jms_exist}){ | |
| mapPut(map="#{pageSession.attrsMap}" key="rarName" value="jmsra"); | |
| } | |
| } | |
| if (#{pageSession.myOption}=dropdown) { | |
| setPageSessionAttribute(key="nameDropDown" value="#{pageSession.attrsMap['rarName']}"); | |
| } | |
| if (#{pageSession.attrsMap['rarName']}) { | |
| gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-resource-adapter-config-properties" | |
| attrs="#{pageSession.attrsMap}" | |
| method="GET" | |
| result="#{requestScope.result}"); | |
| gf.getConfigPropsInfo(extraProps="#{requestScope.result.data.extraProperties}", key="configProps", result="#{pageSession.tableList}" hasConfidentialProps="#{pageSession.hasConfidential}"); | |
| } | |
| /> | |
| </event> | |
| <sun:form id="propertyForm"> | |
| #include "/common/shared/alertMsg_1.inc" | |
| <sun:title id="propertyContentPage" title="$resource{i18njca.resourceAdapterConfig.newPageTitle}" helpText="$resource{i18njca.resourceAdapterConfig.newPageTitleHelp}"> | |
| #include "/jca/resourceAdapterConfigButtons.inc" | |
| </sun:title> | |
| #include "/jca/resourceAdapterConfigAttr.inc" | |
| #include "/common/resourceNode/confidentialPropsTable.inc" | |
| <sun:hidden id="helpKey" value="$resource{help_jca.resourceAdapterConfigNew}" /> | |
| </sun:form> | |
| <f:verbatim> | |
| <script type="text/javascript"> | |
| function navigateToPage(name, option) { | |
| var nameTextVal = document.getElementById("$pageSession{textId}").value; | |
| top.admingui.ajax.loadPage({url:'$pageSession{selfPage}?myOption='+option+'&nameText='+nameTextVal+'&name='+name}); | |
| return true; | |
| } | |
| function CheckForEmptyName(option, reqMsg) { | |
| var comp = document.getElementById("$pageSession{textId}"); | |
| var nameTextVal = comp.value; | |
| if (option == 'text' && (nameTextVal==null || nameTextVal=='')){ | |
| showAlert(reqMsg); | |
| comp.focus(); | |
| return false; | |
| } | |
| if (option=='text') { | |
| return checkForBackslash('#{textId}', '$resource{i18n.msg.JS.resources.resName}'); | |
| } | |
| return true; | |
| } | |
| </script> | |
| </f:verbatim> | |
| "<br/> | |
| #include "/common/shared/radioButtonsJS.inc" | |
| #include "/common/shared/changeButtonsJS.inc" | |
| </define> | |
| </composition> |