ServerEditCTS.jsp revision 3cf8f706326bda47e94caecf3edf58153fcab100
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync The contents of this file are subject to the terms of the Common Development and
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Distribution License (the License). You may not use this file except in compliance with the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync specific language governing permission and limitations under the License.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync When distributing Covered Software, include this CDDL Header Notice in each file and include
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Header, with the fields enclosed by brackets [] replaced by your own identifying
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync information: "Portions copyright [year] [name of copyright owner]".
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Copyright 2013 ForgeRock AS.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync<%@ page info="ServerEditCTS" language="java" %>
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync<%@taglib uri="/WEB-INF/jato.tld" prefix="jato" %>
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync<%@taglib uri="/WEB-INF/cc.tld" prefix="cc" %>
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync<jato:useViewBean className="com.sun.identity.console.service.ServerEditCTSViewBean" fireChildDisplayEvents="true" >
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:i18nbundle baseName="amConsole" id="amConsole" locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:header name="hdrCommon" pageTitle="webconsole.title" bundleID="amConsole" copyrightYear="2007" fireDisplayEvents="true">
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <script language="javascript">
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync // Field names.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var storeLocationRadioButtonName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-location';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var sslEnableCheckBoxName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-ssl-enabled';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var directoryNameFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-directory-name';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var portFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-port';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var loginIdFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-loginid';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var passwordFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-password';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var maxConnectionsFieldName = 'ServerEditCTS.cscorg-forgerock-services-cts-store-max-connections';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var heartbeat = 'ServerEditCTS.cscorg-forgerock-services-cts-store-heartbeat';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync window.onload = function() {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync // Set the initial state of the fields.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var radioBtns = document.getElementsByName(storeLocationRadioButtonName);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync // Do nothing, there must be two radio buttons.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync toggleExternalConfig((radioBtns[0].checked) ? radioBtns[0] : radioBtns[1]);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync // Retrieves the first element of the given name.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync function getFirstElementByName(name) {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var elements = document.getElementsByName(name);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return (elements.length > 0) ? elements[0] : null;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync // Toggles the status of the external configuration fields.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync function toggleExternalConfig(storeLocationRadioButton) {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var readonly = storeLocationRadioButton.value == 'default';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync toggleField(sslEnableCheckBoxName, readonly);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync toggleField(directoryNameFieldName, readonly);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync toggleField(portFieldName, readonly);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync toggleField(loginIdFieldName, readonly);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync toggleField(passwordFieldName, readonly);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync toggleField(maxConnectionsFieldName, readonly);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync toggleField(heartbeat, readonly);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync // Toggles the status of a given field.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync function toggleField(fieldName, readonly) {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync var field = getFirstElementByName(fieldName);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if (field != null) {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync if (readonly) {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync field.setAttribute('readonly', 'readonly');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync field.className = 'TxtFldDis';
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:form name="ServerEditCTS" method="post" defaultCommandChild="/button1">
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <script language="javascript">
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync function confirmLogout() {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return confirm("<cc:text name="txtLogout" defaultValue="masthead.logoutMessage" bundleID="amConsole"/>");
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:primarymasthead name="mhCommon" bundleID="amConsole" logoutOnClick="return confirmLogout();" locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:breadcrumbs name="breadCrumb" bundleID="amConsole" />
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:tabs name="tabCommon" bundleID="amConsole" />
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <table border="0" cellpadding="10" cellspacing="0" width="100%">
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:alertinline name="ialertCommon" bundleID="amConsole" />
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <%-- PAGE CONTENT --------------------------------------------------------- --%>
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:pagetitle name="pgtitleThreeBtns" bundleID="amConsole" pageTitleText="page.title.server.edit" showPageTitleSeparator="true" viewMenuLabel="" pageTitleHelpMessage="" showPageButtonsTop="true" showPageButtonsBottom="false" />
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <table border="0" cellpadding="10" cellspacing="0" width="100%">
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:button name="btnInherit" bundleID="amConsole" defaultValue="serverconfig.button.inherit" type="primary" />
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync <cc:propertysheet name="propertyAttributes" bundleID="amConsole" showJumpLinks="true"/>
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync </cc:header>
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync</jato:useViewBean>