blob: b59cc04a7b0f59a061e7e134c8f05da375ed3788 [file] [log] [blame]
<!--
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/jdbcConnectionPoolAdvance.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.advancePageTitle}" guiOnLoad="disableTableField(); enableDisableLazyConnection('#{associateId}');" >
<!define name="content">
<event>
<!beforeEncode
getUIComponent(clientId="$pageSession{tableDropdownTextId}" component=>$attribute{tableDropdownTextId});
getUIComponent(clientId="$pageSession{validCNDropdownTextId}" component=>$attribute{validCNDropdownTextId});
setDisableConnectionPoolTableField(tableDD="$attribute{tableDropdownTextId}" validationField="$attribute{validCNDropdownTextId}" methodValue="#{pageSession.valueMap['connectionValidationMethod']}");
/>
</event>
<event>
<!beforeCreate
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/jdbcConnectionPoolAdvance.jsf?name=#{pageSession.encodedName}#{pageSession.selfPageArgs}");
setPageSessionAttribute(key="childType" value="jdbc-connection-pool");
setPageSessionAttribute(key="childType" value="jdbc-connection-pool");
gf.buildResourceUrl(base="#{pageSession.parentUrl}/#{pageSession.childType}", resourceName="#{pageSession.Name}", url="#{pageSession.resourceUrl}");
setPageSessionAttribute(key="poolGeneralAttrs" value={"resType" "datasourceClassname"
"driverClassname" "ping" "description" "steadyPoolSize" "maxPoolSize" "poolResizeQuantity"
"idleTimeoutInSeconds" "maxWaitTimeInMillis" "nonTransactionalConnections"
"transactionIsolationLevel" "isIsolationLevelGuaranteed"});
setPageSessionAttribute(key="rest-api" value="true");
gf.getEntityAttrs(endpoint="#{pageSession.resourceUrl}.json", valueMap="#{pageSession.valueMap}");
if("#{pageSession.valueMap.resType}=java.sql.Driver") {
urlencode(value="#{pageSession.valueMap.driverClassname}" encoding="UTF-8" result=>$attribute{encodedClassName});
}
if("!(#{pageSession.valueMap.resType}=java.sql.Driver)") {
urlencode(value="#{pageSession.valueMap.datasourceClassname}" encoding="UTF-8" result=>$attribute{encodedClassName});
}
gf.filterMap(map="#{pageSession.valueMap}" attrNames="#{pageSession.poolGeneralAttrs}" keep="#{false}" resultMap="#{pageSession.valueMap}");
setPageSessionAttribute(key="convertToFalseList" value={"wrapJdbcObjects" "pooling" "connectionLeakReclaim" "statementLeakReclaim"
"lazyConnectionAssociation" "lazyConnectionEnlistment"
"associateWithThread" "matchConnections" "allowNonComponentCallers"
"isConnectionValidationRequired" "failAllConnections"});
setPageSessionAttribute(key="skipAttrsList", value={"jndiName"});
gf.createAttributeMap(keys={"poolName"} values={"$pageSession{encodedName}"} map="#{pageSession.attrMap}");
if(#{pageSession.isAppScopedRes}){
mapPut(map="#{pageSession.attrMap}" key="appName" value="#{pageSession.encodedAppName}");
if(#{pageSession.moduleName}){
mapPut(map="#{pageSession.attrMap}" key="modulename" value="#{pageSession.encodedModuleName}");
}
}
gf.createAttributeMap(keys={"className"} values={"$attribute{encodedClassName}"} map="#{pageSession.validCNAttrMap}");
if ("#{pageSession.valueMap.isConnectionValidationRequired}=true") {
if ("#{pageSession.valueMap.connectionValidationMethod}=custom-validation") {
gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-validation-class-names"
attrs="#{pageSession.validCNAttrMap}"
method="get"
result="#{requestScope.result}");
setPageSessionAttribute(key="classNameList" value="#{requestScope.result.data.extraProperties.validationClassNames}");
gf.containedIn(list="#{pageSession.classNameList}" testStr="#{pageSession.valueMap.validationClassname}" contain="#{requestScope.isClassNames}");
}
}
setAttribute(key="emptyStr" value="");
setPageSessionAttribute(key="myTableOption" value="text");
setPageSessionAttribute(key="myValidCNOption" value="dropdown");
if (#{pageSession.valueMap.validationTableName}) {
if ("!(#{pageSession.valueMap.validationTableName}='')") {
setPageSessionAttribute(key="tableTextValue" value="#{pageSession.valueMap.validationTableName}");
setPageSessionAttribute(key="myTableOption" value="text");
}
}
if (#{requestScope.isClassNames}) {
setPageSessionAttribute(key="validCNDropDownValue" value="#{pageSession.valueMap.validationClassname}");
}
if (!#{requestScope.isClassNames}) {
if (#{pageSession.valueMap.validationClassname}) {
if ("!(#{pageSession.valueMap.validationClassname}='')") {
setPageSessionAttribute(key="validCNTextValue" value="#{pageSession.valueMap.validationClassname}");
setPageSessionAttribute(key="myValidCNOption" value="text");
}
}
}
//set the following for including buttons.inc
setPageSessionAttribute(key="edit" value="#{true}" );
setPageSessionAttribute(key="showDefaultButton" value="#{true}" );
/>
</event>
<sun:form id="propertyForm">
#include "/jdbc/jdbcConnectionPoolTabs.inc"
#include "/common/shared/alertMsg_1.inc"
<!-- Page Title -->
<sun:title id="propertyContentPage" title="$resource{i18njdbc.jdbcConnectionPool.advancePageTitle}"
helpText="$resource{i18njdbc.jdbcConnectionPool.advancePageTitleHelp}">
#include "/common/shared/editPageLoadDefaultButton.inc"
#include"/jdbc/jdbcConnectionPoolAdvanceButtons.inc"
</sun:title>
#include "/jdbc/advancePool.inc"
"<br>
<sun:title >
#include"/jdbc/jdbcConnectionPoolAdvanceButtons.inc"
</sun:title>
<sun:hidden id="helpKey" value="$resource{help_jdbc.jdbcConnectionPoolAdvance}" />
</sun:form>
#include "/jdbc/lazyConnectionJS.inc"
#include "/jdbc/jdbcConnectionPoolAdvanceJS.inc"
</define>
</composition>