| <!-- | |
| Copyright (c) 2009, 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 | |
| --> | |
| <!-- msgSecurity/msgSecurityNew.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.headings.NewMsgSecurity}" > | |
| <!define name="content"> | |
| <event> | |
| <!beforeCreate | |
| getRequestValue(key="configName" value=>$page{configName} default="server-config"); | |
| setPageSessionAttribute(key="parentPage" value="#{request.contextPath}/common/security/msgSecurity/msgSecurity.jsf"); | |
| createList(size="0", result="#{pageSession.tableList}"); | |
| createMap(result="#{pageSession.valueMap}") | |
| mapPut(map="#{pageSession.valueMap}" key="configName" value="#{pageSession.configName}"); | |
| setPageSessionAttribute(key="providerSectionLabel" value="$resource{i18nc.msgSecProvider.providerConfLabel}" ) | |
| setPageSessionAttribute(key="edit" value="#{false}" ); | |
| /> | |
| </event> | |
| <sun:form id="propertyForm"> | |
| #include "/common/shared/alertMsg.inc" | |
| <!-- Page Title --> | |
| <sun:title id="propertyContentPage" title="$resource{i18nc.headings.NewMsgSecurity}" helpText="$resource{i18nc.msgSecurity.NewMsgSecurityInfo}"> | |
| <!facet pageButtonsTop> | |
| <sun:panelGroup id="topButtons"> | |
| <sun:button id="newButton" rendered="#{!edit}" text="$resource{i18n.button.OK}" | |
| onClick="if (guiValidate('#{reqMsg}','#{reqInt}','#{reqPort}')) {submitAndDisable(this, '$resource{i18n.button.Processing}');}; return false;" > | |
| <!command | |
| getUIComponent(clientId="$pageSession{propertyTableRowGroupId}", component=>$attribute{tableRowGroup}); | |
| getAllSingleMapRows(TableRowGroup="$attribute{tableRowGroup}", Rows=>$attribute{newList}); | |
| createMap(result="#{pageSession.securityConfigMap}") | |
| mapPut(map="#{pageSession.securityConfigMap}" key="layer" value="#{pageSession.valueMap['AuthLayer']}"); | |
| if ("#{pageSession.valueMap['defaultProvider']}=true") { | |
| mapPut(map="#{pageSession.securityConfigMap}" key="isdefaultprovider" value="true"); | |
| } | |
| if ("!(#{pageSession.valueMap['defaultProvider']}=true)") { | |
| mapPut(map="#{pageSession.securityConfigMap}" key="isdefaultprovider" value="false"); | |
| } | |
| mapPut(map="#{pageSession.securityConfigMap}" key="id" value="#{pageSession.valueMap['Name']}"); | |
| mapPut(map="#{pageSession.securityConfigMap}" key="providertype" value="#{pageSession.valueMap['ProviderType']}"); | |
| mapPut(map="#{pageSession.securityConfigMap}" key="classname" value="#{pageSession.valueMap['ClassName']}"); | |
| mapPut(map="#{pageSession.securityConfigMap}" key="target" value="#{pageSession.configName}"); | |
| gf.restRequest(endpoint="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/security-service/message-security-config" attrs="#{pageSession.securityConfigMap}"); | |
| setPageSessionAttribute(key="selfUrl", value="#{sessionScope.REST_URL}/configs/config/#{pageSession.configName}/security-service/message-security-config/#{pageSession.valueMap['AuthLayer']}/provider-config/#{pageSession.valueMap['Name']}"); | |
| javaToJSON(obj="#{pageSession.tableList}" json="#{requestScope.tmpJSON}"); | |
| gf.restRequest(endpoint="#{pageSession.selfUrl}/property.json" method="POST" data="#{requestScope.tmpJSON}" result="#{requestScope.restResponse}"); | |
| gf.redirect(page="#{pageSession.parentPage}?configName=#{configName}") | |
| /> | |
| </sun:button> | |
| <sun:button id="cancelButton" immediate="#{true}" primary="#{false}" rendered="#{pageSession.showCancelButton}" text="$resource{i18n.button.Cancel}" > | |
| <!command | |
| gf.redirect(page="#{parentPage}?configName=#{configName}"); | |
| /> | |
| </sun:button> | |
| </sun:panelGroup> | |
| </facet> | |
| </sun:title> | |
| <sun:propertySheet id="propertySheet"> | |
| #include "/common/shared/configNameSection.inc" | |
| <sun:propertySheetSection id="propertySheetSection"> | |
| <sun:property id="AuthLayerProp" labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18nc.msgSecurity.authLayerLabel}" > | |
| <sun:dropDown id="AuthLayer" selected="#{pageSession.valueMap['AuthLayer']}" labels="$pageSession{layers}" required="#{true}" > | |
| <!beforeCreate | |
| getMessageSecurityAuthLayersForCreate(layers="#{pageSession.layers}" configName="#{pageSession.configName}"); | |
| /> | |
| </sun:dropDown> | |
| </sun:property> | |
| </sun:propertySheetSection> | |
| #include "providerAttr.inc" | |
| </sun:propertySheet> | |
| "<br/><br/> | |
| #include "/common/shared/propertyDescTable.inc" | |
| <sun:hidden id="helpKey" value="$resource{help_common.msgSecurityConfigNew}" /> | |
| </sun:form> | |
| </define> | |
| </composition> |