| <!-- |
| |
| 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 |
| |
| --> |
| |
| <!-- jca/connectorConnectionPoolsNew1.jsf --> |
| |
| <!initPage |
| setResourceBundle(key="i18njca" bundle="org.glassfish.jca.admingui.Strings"); |
| setResourceBundle(key="help_jca" bundle="org.glassfish.jca.admingui.Helplinks") |
| setAttribute(key="edit" value="#{false}"); |
| /> |
| <!composition template="/templates/default.layout" guiTitle="$resource{i18njca.connectorConnectionPool.step1PageTitle}" > |
| <!define name="content"> |
| <event> |
| <!beforeCreate |
| setPageSessionAttribute(key="edit" value="#{false}" ); |
| getRequestValue(key="configName" value=>$page{configName} default="server-config"); |
| setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/jca/connectorConnectionPoolNew1.jsf"); |
| setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/jca/connectorConnectionPools.jsf"); |
| setPageSessionAttribute(key="childType" value="connector-connection-pool"); |
| |
| //REST related |
| setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/resources"); |
| setPageSessionAttribute(key="rest-api" value="true"); |
| gf.getDefaultValues(endpoint="#{pageSession.parentUrl}/#{pageSession.childType}", valueMap="#{pageSession.tmpMap}"); |
| /> |
| /> |
| </event> |
| <sun:form id="propertyForm"> |
| #include "/common/applications/applicationHandlers.inc" |
| #include "/common/shared/alertMsg_1.inc" |
| |
| <!-- Page Title --> |
| <!-- Page Title --> |
| <sun:title id="title" title="$resource{i18njca.connectorConnectionPool.step1PageTitle}" |
| helpText="$resource{i18njca.connectorConnectionPool.step1PageTitleHelp}"> |
| <!facet pageButtonsTop> |
| <sun:panelGroup id="topButtons"> |
| <sun:button id="nextButton" text="$resource{i18n.button.Next}" |
| onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}') && checkForBackslash('#{jndiNameId}', '$resource{i18n.msg.JS.resources.resName}')) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" > |
| <!command |
| //Update the connector connection pool wizard |
| setAttribute(key="currentAdapter" value="#{wizardPoolExtra.resourceAdapterName}"); |
| setAttribute(key="currentconnDef" value="#{wizardPoolExtra.connectiondefinitionname}"); |
| if ("#{currentAdapter} & #{currentconnDef}") { |
| if ("!((#{currentAdapter} = #{wizardPoolExtra.previousResAdapter}) & |
| (#{currentconnDef} = #{wizardPoolExtra.previousDefinition}))") { |
| gf.createAttributeMap(keys={"rarname", "connectionDefnName"} |
| values={"$attribute{currentAdapter}", "$attribute{currentconnDef}"} |
| map="#{requestScope.mcfAttrs}"); |
| gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-mcf-config-properties" |
| attrs="#{requestScope.mcfAttrs}" |
| method="GET" |
| result="#{requestScope.result}"); |
| |
| gf.getConfigPropsInfo(extraProps="#{requestScope.result.data.extraProperties}", key="mcfConfigProps", result="#{requestScope.mcfProps}" hasConfidentialProps="#{pageSession.hasConfidential}"); |
| gf.updateConnectorConnectionPoolWizard(props="#{requestScope.mcfProps}" currentAdapter="#{currentAdapter}" currentDef="#{currentConnDef}", hasConfidential="#{pageSession.hasConfidential}"); |
| } |
| } |
| gf.redirect(page="#{request.contextPath}/jca/connectorConnectionPoolNew2.jsf") |
| /> |
| </sun:button> |
| <sun:button id="cancelButton" immediate="#{true}" primary="#{false}" text="$resource{i18n.button.Cancel}" > |
| <!command |
| setSessionAttribute(key="wizardMap" value="#{null}") |
| setSessionAttribute(key="wizardPoolExtra" value="#{null}") |
| setSessionAttribute(key="wizardPoolProperties" value="#{null}") |
| gf.redirect(page="#{request.contextPath}/jca/connectorConnectionPools.jsf") |
| /> |
| </sun:button> |
| </sun:panelGroup> |
| </facet> |
| </sun:title> |
| <!-- PropertySheet .... --> |
| <sun:propertySheet id="propertySheet"> |
| <sun:propertySheetSection id="generalPropertySheet" > |
| <!beforeCreate |
| setPageSessionAttribute(key="snifferType" value="connector"); |
| gfr.getApplicationsBySnifferType(); |
| setAttribute(key="tmpList" value="#{pageSession.snifferTypeApplicationsList}"); |
| filterOutRarExtension(inList="#{requestScope.tmpList}" convertedList="#{requestScope.rarList}") |
| |
| //Add SystemConnectors |
| setAttribute(key="modList" value={}); |
| if ("#{sessionScope._jms_exist}"){ |
| gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-system-rars-allowing-pool-creation" |
| method="GET", result="#{requestScope.result}"); |
| setAttribute(key="modList" value="#{requestScope.result.data.extraProperties.rarList}"); |
| } |
| gf.listCombine(list="#{requestScope.modList}" list2="#{requestScope.rarList}"); |
| addEmptyFirstElement(in="$attribute{modList}" out="#{pageSession.modules}") |
| gf.getConnectorConnectionPoolWizard( |
| fromStep1="$attribute{fromStep1}" |
| fromStep2="$attribute{fromStep2}" |
| poolName="$attribute{poolName}" |
| attrMap="#{pageSession.tmpMap}" |
| resAdapter="$attribute{resAdapterChoosen}" |
| resultAdapter=>$attribute{resultAdapter} ) |
| //To get the connection definitions |
| if("#{resultAdapter}") { |
| gf.createAttributeMap(keys={"rarName"} values={"$attribute{resultAdapter}"} map="#{requestScope.connDefAttrs}"); |
| gf.restRequest(endpoint="#{sessionScope.REST_URL}/resources/get-connection-definition-names" |
| attrs="#{requestScope.connDefAttrs}" |
| method="GET" |
| result="#{requestScope.result}"); |
| setAttribute(key="connectionDefinitions" value="#{requestScope.result.data.extraProperties.defnNames}"); |
| } |
| /> |
| <sun:property id="jndiProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njca.poolName}" > |
| <sun:textField id="name" styleClass="required" columns="$int{50}" maxLength="#{sessionScope.fieldLengths['maxLength.poolName']}" text="#{wizardPoolExtra.name}" required="#{true}" > |
| <!afterCreate |
| getClientId(component="$this{component}" clientId=>$page{jndiNameId}); |
| /> |
| </sun:textField> |
| </sun:property> |
| |
| <sun:property id="resAdapterProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.common.resourceAdapter}" helpText="$resource{i18njca.adminObjectResource.resourceAdapterHelp}"> |
| <sun:dropDown id="db" selected="#{wizardPoolExtra.resourceAdapterName}" submitForm="#{true}" immediate="#{true}" |
| labels="$pageSession{modules}" styleClass="required" required="#{true}" > |
| <!command |
| getUIComponent(clientId="#{jndiNameId}", component=>$attribute{nameComponent}); |
| getUIComponentProperty(component="$attribute{nameComponent}", name="submittedValue", value=>$attribute{poolName}); |
| setAttribute(key="click" value="$this{component}"); |
| setAttribute(key="resAdapterChoosen" value="#{click.selected}") |
| setAttribute(key="fromStep1" value="#{true}") |
| gf.navigate(page="#{request.contextPath}/jca/connectorConnectionPoolNew1.jsf"); |
| /> |
| </sun:dropDown> |
| </sun:property> |
| |
| <sun:property id="connectionDefProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njca.connectorConnectionPool.connectionDefinitionName}" helpText="$resource{i18njca.connectorConnectionPool.connectionDefinitionNameHelp}"> |
| <sun:dropDown id="db" required="#{true}" styleClass="required" selected="#{wizardPoolExtra.connectiondefinitionname}" labels="$attribute{connectionDefinitions}" /> |
| </sun:property> |
| </sun:propertySheetSection> |
| </sun:propertySheet> |
| |
| <sun:hidden id="helpKey" value="$resource{help_jca.connectorConnectionPoolNew1}" /> |
| </sun:form> |
| "<br/> |
| #include "/common/shared/changeButtonsJS.inc" |
| </define> |
| </composition> |