blob: abdc79de1a8a08f76f5a13751341bcb289fe2b3c [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/jdbcConnectionPoolNew1.jsf -->
<!initPage
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.step1PageTitle}"
guiOnLoad="admingui.nav.selectTreeNodeWithURL('#{request.contextPath}/jdbc/jdbcConnectionPools.jsf')" >
<!define name="content">
<event>
<!beforeCreate
setPageSessionAttribute(key="edit" value="#{false}" );
setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/jdbc/jdbcConnectionPools.jsf");
setPageSessionAttribute(key="childType" value="jdbc-connection-pool");
setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/resources");
setPageSessionAttribute(key="rest-api" value="true");
gf.getDefaultValues(endpoint="#{pageSession.parentUrl}/#{pageSession.childType}", valueMap="#{pageSession.tmpMap}");
setJDBCPoolWizard(fromStep2="$attribute{fromStep2}", attrMap="#{pageSession.tmpMap}",
ResTypeList=>$attribute{ResTypeList}, DBVendorList=>$attribute{DBVendorList});
/>
</event>
" <script type="text/javascript">admingui.nav.selectTreeNodeById(admingui.nav.TREE_ID+":resources:JDBC:connectionPoolResources");</script>
<sun:form id="propertyForm">
<!-- Page Title -->
<sun:title id="propertyContentPage" title="$resource{i18njdbc.jdbcConnectionPool.step1PageTitle}"
helpText="$resource{i18njdbc.jdbcConnection.step1PageHelp}">
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
<sun:button id="nextButton" text="$resource{i18n.button.Next}"
onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}') && checkForBackslash('#{resCompId}', '$resource{i18n.msg.JS.resources.resName}')) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" >
<!command
gf.updateJDBCPoolWizardStep1();
gf.redirect(page="#{request.contextPath}/jdbc/jdbcConnectionPoolNew2.jsf?fromStep2=false")
/>
</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="#{parentPage}");
/>
</sun:button>
</sun:panelGroup>
</facet>
<!-- PropertySheet .... -->
<sun:propertySheet id="propertySheet" requiredFields="true">
<sun:propertySheetSection id="generalPropertySheet" label="$resource{i18njdbc.jdbcPool.general}">
<sun:property id="jndiProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njdbc.jdbcPool.poolName}">
<sun:textField id="name" styleClass="required" columns="$int{30}" maxLength="#{sessionScope.fieldLengths['maxLength.jdbcPool.poolName']}" text="#{wizardPoolExtra.name}" required="#{true}">
<!afterCreate
getClientId(component="$this{component}" clientId=>$page{resCompId});
/>
</sun:textField>
</sun:property>
<sun:property id="resTypeProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.common.resType}" helpText="$resource{i18njdbc.jdbcPool.resTypeHelp}" >
<sun:dropDown id="resType" selected="#{wizardPoolExtra.resType}" labels="$attribute{ResTypeList}" />
</sun:property>
<sun:property id="dbProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njdbc.jdbcPool.dbVendor}" helpText="$resource{i18njdbc.jdbcPool.dbVendorHelp}">
<sun:dropDown id="db" selected="#{wizardPoolExtra.DBVendorBox}" labels="$attribute{DBVendorList}" onChange="emptyDBVendorField(this.value);">
<!afterCreate
getClientId(component="$this{component}" clientId="#{pageSession.dbBoxId}");
/>
</sun:dropDown>
"<br/>
<sun:textField id="dbField" columns="$int{60}" maxLength="#{sessionScope.fieldLengths['maxLength.common.resType']}" text="#{wizardPoolExtra.DBVendorField}" onFocus="emptyDropdown(this.value);">
<!afterCreate
getClientId(component="$this{component}" clientId="#{pageSession.dbFieldId}");
/>
</sun:textField>
</sun:property>
<sun:property id="introspect" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18njdbc.jdbcPool.introspect}" helpText="$resource{i18njdbc.jdbcPool.introspectHelp}">
<sun:checkbox selected="#{wizardPoolExtra.introspect}" selectedValue="true" />
</sun:property>
"<br /><br />
</sun:propertySheetSection>
</sun:propertySheet>
</sun:title>
<sun:hidden id="helpKey" value="$resource{help_jdbc.jdbcConnectionPoolNew1}" />
</sun:form>
<f:verbatim>
<script type="text/javascript">
function emptyDBVendorField(dropDownValue) {
if (dropDownValue==''){
enableComponent('#{pageSession.dbFieldId}', 'text');
}else{
getTextElement('#{pageSession.dbFieldId}').value="";
}
}
function emptyDropdown(fieldValue) {
getSelectElement('#{pageSession.dbBoxId}').value="";
}
</script>
</f:verbatim>
</define>
</composition>