| <!-- |
| |
| Copyright (c) 1997, 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 |
| |
| --> |
| |
| <!-- jdbc/jdbcConnectionPoolProperty.jsf --> |
| <!initPage |
| setResourceBundle(key="i18n" bundle="org.glassfish.admingui.core.Strings") |
| setResourceBundle(key="i18njdbc" bundle="org.glassfish.jdbc.admingui.Strings") |
| setResourceBundle(key="help_jdbc" bundle="org.glassfish.jdbc.admingui.Helplinks"); |
| /> |
| <!composition template="/templates/default.layout" guiTitle="$resource{i18njdbc.jdbcConnectionPool.propertyPageTitle}" > |
| <!define name="content"> |
| <event> |
| <!beforeCreate |
| setSessionAttribute(key="jdbcPoolTabs" value="propertyTab"); |
| getRequestValue(key="name" value="#{pageSession.Name}"); |
| urlencode(value="#{pageSession.Name}" encoding="UTF-8" result="#{pageSession.encodedName}"); |
| getRequestValue(key="isAppScopedRes" value="#{pageSession.isAppScopedRes}"); |
| if(#{pageSession.isAppScopedRes}){ |
| getRequestValue(key="appName" value="#{pageSession.encodedAppName}"); |
| getRequestValue(key="moduleName" value="#{pageSession.moduleName}"); |
| if(#{pageSession.moduleName}) { |
| urlencode(value="#{pageSession.moduleName}" encoding="UTF-8" result="#{pageSession.encodedModuleName}"); |
| setPageSessionAttribute(key="selfPageArgs" value="&isAppScopedRes=$boolean{true}&appName=#{pageSession.encodedAppName}&moduleName=#{pageSession.encodedModuleName}"); |
| setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/applications/application/#{pageSession.encodedAppName}/module/#{pageSession.encodedModuleName}/resources"); |
| } |
| if(!#{pageSession.moduleName}) { |
| setPageSessionAttribute(key="selfPageArgs" value="&isAppScopedRes=$boolean{true}&appName=#{pageSession.encodedAppName}"); |
| setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/applications/application/#{pageSession.encodedAppName}/resources"); |
| } |
| setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/common/applications/resources/appScopedResources.jsf?appName=#{pageSession.encodedAppName}&listPageLink=/common/applications/applications.jsf"); |
| } |
| if(!#{pageSession.isAppScopedRes}){ |
| setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/jdbc/jdbcConnectionPools.jsf"); |
| setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/resources"); |
| } |
| setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/jdbc/jdbcConnectionPoolProperty.jsf?name=#{pageSession.encodedName}#{pageSession.selfPageArgs}"); |
| |
| setPageSessionAttribute(key="childType" value="jdbc-connection-pool"); |
| gf.buildResourceUrl(base="#{pageSession.parentUrl}/#{pageSession.childType}", resourceName="#{pageSession.Name}", url="#{pageSession.resourceUrl}"); |
| |
| |
| gf.getEntityAttrs(endpoint="#{pageSession.resourceUrl}", valueMap="#{pageSession.valueMap}"); |
| setPageSessionAttribute(key="skipAttrsList", value={"jndiName"}); |
| |
| gf.restRequest(endpoint="#{pageSession.resourceUrl}/property.json", method="GET", result="#{requestScope.propTable}"); |
| setPageSessionAttribute(key="tableList", value="#{requestScope.propTable.data.extraProperties.properties}"); |
| /> |
| </event> |
| <sun:form id="propertyForm"> |
| #include "jdbcConnectionPoolTabs.inc" |
| #include "/common/shared/alertMsg_1.inc" |
| <!-- Page Title --> |
| <sun:title id="propertyContentPage" title="$resource{i18njdbc.jdbcConnectionPool.propertyPageTitle}" |
| helpText="$resource{i18njdbc.jdbcConnectionPool.propertyPageTitleHelp}"> |
| <!facet pageButtonsTop> |
| <sun:panelGroup id="topButtons"> |
| <sun:button id="saveButton" text="$resource{i18n.button.Save}"> |
| <!command |
| removeEmptyProps(props="#{pageSession.tableList}" modifiedProps="#{pageSession.tableList}"); |
| javaToJSON(obj="#{pageSession.tableList}" json="#{requestScope.tmpJSON}"); |
| gf.restRequest(endpoint="#{pageSession.resourceUrl}/property.json", method="POST", data="#{requestScope.tmpJSON}", result="#{requestScope.restResponse}"); |
| if ("#{valueMap['ping']}") { |
| urlencode(value="#{valueMap['name']}" encoding="UTF-8" result="#{pageSession.encodeName}"); |
| gf.createAttributeMap(keys={"id"} values={"$pageSession{encodeName}"} map="#{requestScope.attrMap}"); |
| if(#{pageSession.isAppScopedRes}){ |
| mapPut(map="#{requestScope.attrMap}" key="appname" value="#{pageSession.encodedAppName}"); |
| if(#{pageSession.moduleName}){ |
| mapPut(map="#{requestScope.attrMap}" key="modulename" value="#{pageSession.encodedModuleName}"); |
| } |
| } |
| gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/ping-connection-pool.json" |
| attrs="#{requestScope.attrMap}" |
| method="get" |
| result="#{requestScope.result}"); |
| } |
| prepareSuccessfulMsg(); |
| gf.redirect(page="#{selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}"); |
| /> |
| </sun:button> |
| <sun:button id="cancelButton" immediate="#{true}" primary="#{false}"text="$resource{i18n.button.Cancel}" > |
| <!command |
| gf.redirect(page="#{parentPage}"); |
| /> |
| </sun:button> |
| </sun:panelGroup> |
| </facet> |
| |
| |
| </sun:title> |
| "<br> |
| #include "/common/resourceNode/poolNameSection.inc" |
| #include "/common/shared/propertyDescTable.inc" |
| <sun:hidden id="helpKey" value="$resource{help_jdbc.jdbcConnectionPoolProperty}" /> |
| </sun:form> |
| #include "/common/shared/changeButtonsJS.inc" |
| </define> |
| </composition> |