blob: c51297a663d5226e523d5697dda25fad4016e84a [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
-->
<!-- appServer/serverInstDomainAttrs.jsf -->
<!initPage
setResourceBundle(key="i18nc" bundle="org.glassfish.common.admingui.Strings");
setResourceBundle(key="help_common" bundle="org.glassfish.common.admingui.Helplinks")
/>
<!composition template="/templates/default.layout" guiTitle="$resource{i18nc.domain.DomainAttrsPageTitle}" >
<!define name="content">
<event>
<!beforeCreate
setSessionAttribute(key="domainTabs" value="domainAttrs");
setPageSessionAttribute(key="selfPage" value="#{request.contextPath}/common/appServer/serverInstDomainAttrs.jsf?");
setPageSessionAttribute(key="selfUrl", value="#{sessionScope.REST_URL}");
gf.getEntityAttrs(endpoint="#{pageSession.selfUrl}.json", valueMap="#{pageSession.valueMap}");
//For GUI load-on-startup
setPageSessionAttribute(key="appPropertyEndpoint" value="#{sessionScope.REST_URL}/system-applications/application/__admingui/property.json")
gf.restRequest(endpoint="#{pageSession.appPropertyEndpoint}" method="GET" result="#{requestScope.propList}");
setPageSessionAttribute(key="appPropList" value="#{requestScope.propList.data.extraProperties.properties}");
/>
</event>
<sun:form id="propertyForm">
#include "/common/appServer/domainTabs.inc"
#include "/common/shared/alertMsg.inc"
<sun:title id="propertyContentPage" title="$resource{i18nc.domain.DomainAttrsPageTitle}" helpText="$resource{i18nc.domain.DomainAttrsPageTitleHelp}">
<!facet pageButtonsTop>
<sun:panelGroup id="topButtons">
<sun:button id="saveButton" text="$resource{i18n.button.Save}"
onClick="submitAndDisable(this, '$resource{i18n.button.Processing}'); return false;" >
<!command
gf.restRequest(endpoint="#{pageSession.selfUrl}" attrs="#{pageSession.valueMap}" method="POST");
if(!#{pageSession.loadOnStartup}){
//will be null if checkbox is unchecked.
setPageSessionAttribute(key="loadOnStartup" value="false");
}
setAttribute(key="found" value="false");
if('! #{pageSession.loadOnStartup}=#{pageSession.origLoadOnStartup}'){
foreach (var="oneProp" list="#{pageSession.appPropList}") {
if (#{requestScope.oneProp.name}=load-system-app-on-startup){
setAttribute(key="found" value="true");
mapPut(map="#{requestScope.oneProp}" key="value" value="#{pageSession.loadOnStartup}")
}
}
if (!#{requestScope.found}){
createMap(result="#{requestScope.jmap}");
mapPut(map="#{requestScope.jmap}" key="name" value="load-system-app-on-startup")
mapPut(map="#{requestScope.jmap}" key="value" value="#{pageSession.loadOnStartup}")
listAdd(list="#{pageSession.appPropList}" value="#{requestScope.jmap}");
}
javaToJSON(obj="#{pageSession.appPropList}" json="#{requestScope.tmpJSON}");
gf.restRequest(endpoint="#{pageSession.appPropertyEndpoint}", method="POST", data="#{requestScope.tmpJSON}");
}
prepareSuccessfulMsg();
gf.redirect(page="#{pageSession.selfPage}&alertType=${alertType}&alertSummary=${alertSummary}&alertDetail=${alertDetail}");
/>
</sun:button>
</sun:panelGroup>
</facet>
</sun:title>
<sun:propertySheet id="propertySheet">
<sun:propertySheetSection id="propertSectionTextField">
<sun:property id="loadOnStartup" labelAlign="left" noWrap="#{false}" overlapLabel="#{false}"
label="$resource{i18nc.domain.loadOnStartup}" helpText="$resource{i18nc.domain.loadOnStartupHelp}">
<sun:checkbox selected="#{pageSession.loadOnStartup}" selectedValue="true" >
<!beforeCreate
setPageSessionAttribute(key="loadOnStartup" value="false");
setPageSessionAttribute(key="origLoadOnStartup" value="false");
foreach (var="oneProp" list="#{pageSession.appPropList}") {
if (#{requestScope.oneProp.name}=load-system-app-on-startup){
setPageSessionAttribute(key="loadOnStartup" value="#{requestScope.oneProp.value}");
setPageSessionAttribute(key="origLoadOnStartup" value="#{requestScope.oneProp.value}");
}
}
/>
</sun:checkbox>
</sun:property>
<sun:property id="dummy" >
<sun:staticText id="dummy" text=" " />
</sun:property>
<sun:property id="appRootProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.domain.AppRoot}" helpText="$resource{i18nc.domain.AppRootHelp}">
<sun:textField id="AppRoot" columns="$int{55}" maxLength="#{sessionScope.fieldLengths['maxLength.domain.AppRoot']}" text="#{pageSession.valueMap['applicationRoot']}"/>
</sun:property>
<sun:property id="logRootProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.domain.LogRoot}" helpText="$resource{i18nc.domain.LogRootHelp}">
<sun:textField id="LogRoot" columns="$int{55}" maxLength="#{sessionScope.fieldLengths['maxLength.domain.LogRoot']}" text="#{pageSession.valueMap['logRoot']}"/>
</sun:property>
<sun:property id="localeProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.domain.Locale}" helpText="$resource{i18nc.domain.LocaleHelp}">
<sun:textField id="Locale" columns="$int{55}" maxLength="#{sessionScope.fieldLengths['maxLength.domain.Locale']}" text="#{pageSession.valueMap['locale']}"/>
</sun:property>
"<br/>
</sun:propertySheetSection>
</sun:propertySheet>
<sun:hidden id="helpKey" value="$resource{help_common.serverInstDomainAttrs}" />
</sun:form>
</define>
</composition>