blob: 89fe869aa73fa3a01241d2ac7b94733b4c7b1dbc [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/jdbcResourceEdit.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.jdbcResource.editPageTitle}" >
<!define name="content">
<event>
<!beforeCreate
setSessionAttribute(key="resEditTabs" value="general");
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="selfPage" value="#{request.contextPath}/jdbc/jdbcResourceEdit.jsf?name=#{pageSession.encodedName}&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="selfPage" value="#{request.contextPath}/jdbc/jdbcResourceEdit.jsf?name=#{pageSession.encodedName}&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="selfPage" value="#{request.contextPath}/jdbc/jdbcResourceEdit.jsf?name=#{pageSession.encodedName}");
setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/jdbc/jdbcResources.jsf");
setPageSessionAttribute(key="parentUrl", value="#{sessionScope.REST_URL}/resources");
}
setPageSessionAttribute(key="childType" value="jdbc-resource");
//For resourceEditTabs.inc
setSessionAttribute(key="resEditTabs" value="general");
setPageSessionAttribute(key="generalPage" value="#{pageSession.selfPage}");
setPageSessionAttribute(key="targetPage" value="#{request.contextPath}/common/resourceNode/resourceEditTargets.jsf?name=#{pageSession.encodedName}");
gf.buildResourceUrl(base="#{pageSession.parentUrl}/#{pageSession.childType}", resourceName="#{pageSession.Name}", url="#{pageSession.selfUrl}");
gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}", valueMap="#{pageSession.valueMap}");
setPageSessionAttribute(key="convertToFalseList" value={"enabled"});
setPageSessionAttribute(key="skipAttrsList", value={"jndiName"});
gf.restRequest(endpoint="#{pageSession.selfUrl}/property.json" method="GET" result="#{requestScope.propTable}");
setPageSessionAttribute(key="tableList" value="#{requestScope.propTable.data.extraProperties.properties}");
//set the following for including buttons.inc
setPageSessionAttribute(key="edit" value="#{true}" );
setPageSessionAttribute(key="showCancelButton" value="#{true}" );
setPageSessionAttribute(key="hasPropertySheet" value="#{true}" );
setPageSessionAttribute(key="hasPropertyTable" value="#{true}" );
setPageSessionAttribute(key="convertToFalseList2" value={"enabled"});
/>
</event>
<sun:form id="propertyForm">
#include "/common/resourceNode/resourceEditTabs.inc"
#include "/common/shared/alertMsg_1.inc"
<!-- Page Title -->
<sun:title id="propertyContentPage" title="$resource{i18njdbc.jdbcResource.editPageTitle}" helpText="$resource{i18njdbc.jdbcResource.editPageTitleHelp}" >
#include "/common/resourceNode/resourceEditPageButtons.inc"
</sun:title>
#include "/jdbc/jdbcResource.inc"
#include "/common/shared/propertyDescTable.inc"
<sun:hidden id="helpKey" value="$resource{help_jdbc.jdbcResourceEdit}" />
</sun:form>
"<br/>
//#include "/common/shared/changeButtonsJS.inc"
</define>
</composition>