step3.htm revision b93185b577f7150fec37f9999b95b246d73bf63c
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd<script type="text/javascript">
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd var multiServer = "false";
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd var validServerURL = "true";
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function configStoreServerValidated( response ) {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd storeServerValidated( '$type', response );
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function configStoreBaseDNValidated( response ) {
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc storeBaseDNValidated('$type', response );
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function configStoreLoginIdValidated( response ) {
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen storeLoginIdValidated( '$type', response );
2e545ce2450a9953665f701bb05350f0d3f26275nd }
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen function validateUserFields(response) {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd if (response.responseText == "ok") {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd eval(field + "Valid = true;" );
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen $(field + 'Status').innerHTML = okString;
3f08db06526d6901aa08c110b5bc7dde6bc39905nd allValid();
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd } else {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd eval(field + "Valid = false;" );
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $(field + 'Status').innerHTML = errorImage +
3f08db06526d6901aa08c110b5bc7dde6bc39905nd '<small>' + response.responseText + '</small>';
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd }
a78048ccbdb6256da15e6b0e7e95355e480c2301nd field = "";
0cf3cdbaa1dad11cbf1ce32e48f1b4ec88cf779fnilgun }
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd function validatePort() {
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd field = "configStorePort";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var callUrl = "$context$path?actionLink=validateLocalPort";
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen var param = "&port=" + $('configStorePort').value;
89507e27e4d31a7e97f258994e4ba3904de47652nd ie7fix++;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd callUrl = callUrl + "&ie7fix=" + ie7fix;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd setTimeout("enableNextButton()", 500);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(callUrl+param, validateUserFields);
9bcfc3697a91b5215893a7d0206865b13fc72148nd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung function validateAdminPort() {
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung field = "configStoreAdminPort";
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung var callUrl = "$context$path?actionLink=validateLocalAdminPort";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var param = "&port=" + $('configStoreAdminPort').value;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd ie7fix++;
9bcfc3697a91b5215893a7d0206865b13fc72148nd callUrl = callUrl + "&ie7fix=" + ie7fix;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd setTimeout("enableNextButton()", 500);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(callUrl+param, validateUserFields);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateJmxPort() {
1c28b8f24d373dfe800f9d99b9eea20fd05c1376rjung field = "configStoreJmxPort";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var callUrl = "$context$path?actionLink=validateLocalJmxPort";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var param = "&port=" + $('configStoreJmxPort').value;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd ie7fix++;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd callUrl = callUrl + "&ie7fix=" + ie7fix;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd setTimeout("enableNextButton()", 500);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(callUrl+param, validateUserFields);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateEncKey() {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('nextTabButton').disabled = true;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var value = escape($('encryptionKey').value);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var callUrl =
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd "$context$path?actionLink=validateEncKey&encKey=" + value;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd setTimeout("enableNextButton()", 500);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(callUrl, validateEncKeyResponse);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateEncKeyResponse(response) {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd if (response.responseText == "true") {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('encryptionKeyStatus').innerHTML = okString;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd } else {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('encryptionKeyStatus').innerHTML = warningImage +
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd '<small>' + response.responseText + '</small>';
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateConfigStoreSSL() {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var value = ($('configStoreSSL').checked) ? "SSL" : "SIMPLE";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var callUrl =
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd "$context$path?actionLink=validateInput&key=configStoreSSL&value=" +
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd value;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd ie7fix++;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd callUrl = callUrl + "&ie7fix=" + ie7fix;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(callUrl, validateConfigSSL);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateConfigSSL(response) {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd // no ops
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateConfigStoreHost() {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var call = "$context$path?actionLink=validateConfigStoreHost";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var hostname = "&configStoreHost=" + $('configStoreHost').value;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('nextTabButton').disabled = true;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd field = "configStoreHost";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd ie7fix++;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd call = call + "&ie7fix=" + ie7fix;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(call+hostname, validateSMHost);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateConfigStoreLoginId() {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('nextTabButton').disabled = true;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd field = "configStoreLoginId";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd setTimeout("enableNextButton()", 500);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd validate();
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateConfigStorePassword() {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('nextTabButton').disabled = true;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd field = "configStorePassword";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd setTimeout("enableNextButton()", 500);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd validatePost();
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateRootSuffix() {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('nextTabButton').disabled = true;
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen ie7fix++;
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf field = "rootSuffix";
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen var callUrl = "$context$path?actionLink=validateRootSuffix&ie7fix=" +
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen ie7fix + "&rootSuffix=" + escape($(field).value);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd setTimeout("enableNextButton()", 500);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(callUrl, fieldValidated);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf function validateServerURL(response) {
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen var resp = eval('('+response.responseText+')');
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen var image = okImage;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd if (resp.code == "100") {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd // url was a valid OpenAM server
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen validServerURL = true;
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen document.getElementById("existingPort").disabled = true;
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen document.getElementById("existingPort").value = resp.existingPort;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd if (resp.embedded == "true") {
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen document.getElementById("replicationPorts").style.display = "";
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf var message = "";
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen if (resp.replication == "true") {
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen document.getElementById("existingRepPort").disabled = true;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd message = '<small>$page.getQuoteEscapedLocalizedString("existing.port.values.replication")</small>';
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd } else {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd document.getElementById("existingRepPort").disabled = false;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd message='<small>$page.getQuoteEscapedLocalizedString("existing.port.values.noreplication")</small>';
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd document.getElementById("replicationMessage").innerHTML= message;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd document.getElementById("existingRepPort").value = resp.replicationPort;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd } else {
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen document.getElementById("existingLDAP").style.display = "";
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen document.getElementById("existingStoreHost").disabled = true;
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen document.getElementById("existingStoreHost").value = resp.existingStoreHost;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd document.getElementById("existingStorePort").disabled = true;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd document.getElementById("existingStorePort").value = resp.existingStorePort;
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf }
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen $('nextTabButton').disabled = false;
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd } else{
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd // error handling
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd validServerURL = false;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd image = errorImage;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd document.getElementById("replicationPorts").style.display = "none";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd document.getElementById("existingLDAP").style.display = "none";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('nextTabButton').disabled = true;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('existingHostStatus').innerHTML = image +
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd '<small>' + resp.message + '</small>';
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function validateHostName() {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('existingHostStatus').innerHTML = '$page.getQuoteEscapedLocalizedString("validating.url.string")';
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var call = "$context$path?actionLink=validateHostName";
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd var hostname = "&hostName=" + $('existingHost').value;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('nextTabButton').disabled = true;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd ie7fix++;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd call = call + "&ie7fix=" + ie7fix;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(call+hostname, validateServerURL);
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd }
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd function localPortResponse(response) {
8ba890719035fe67c295c9124693138f9c5aa933kess var message = response.responseText;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd if (message == "ok") {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd eval(field + "Valid = true;" );
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $(field + 'Status').innerHTML = okString;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd } else {
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd eval(field + "Valid = false;" );
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $(field + 'Status').innerHTML = errorImage +
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd '<small>' + message + '</small>';
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd $('nextTabButton').disabled = true;
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd }
a78048ccbdb6256da15e6b0e7e95355e480c2301nd field = "";
0cf3cdbaa1dad11cbf1ce32e48f1b4ec88cf779fnilgun }
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung
727872d18412fc021f03969b8641810d8896820bhumbedooh function validateLocalConfigPort() {
0d0ba3a410038e179b695446bb149cce6264e0abnd field = "localConfigPort";
727872d18412fc021f03969b8641810d8896820bhumbedooh var call = "$context$path?actionLink=validateLocalPort";
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh var portVal = "&port=" + $('localConfigPort').value;
0d0ba3a410038e179b695446bb149cce6264e0abnd ie7fix++;
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh call = call + "&ie7fix=" + ie7fix;
727872d18412fc021f03969b8641810d8896820bhumbedooh AjaxUtils.call(call+portVal, localPortResponse);
0d0ba3a410038e179b695446bb149cce6264e0abnd }
0d0ba3a410038e179b695446bb149cce6264e0abnd
0d0ba3a410038e179b695446bb149cce6264e0abnd function validateLocalConfigAdminPort() {
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh field = "localConfigAdminPort";
0d0ba3a410038e179b695446bb149cce6264e0abnd var call = "$context$path?actionLink=validateLocalAdminPort";
0d0ba3a410038e179b695446bb149cce6264e0abnd var portVal = "&port=" + $('localConfigAdminPort').value;
0d0ba3a410038e179b695446bb149cce6264e0abnd ie7fix++;
727872d18412fc021f03969b8641810d8896820bhumbedooh call = call + "&ie7fix=" + ie7fix;
0d0ba3a410038e179b695446bb149cce6264e0abnd AjaxUtils.call(call+portVal, localPortResponse);
0d0ba3a410038e179b695446bb149cce6264e0abnd }
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh
205f749042ed530040a4f0080dbcb47ceae8a374rjung function validateLocalConfigJmxPort() {
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen field = "localConfigJmxPort";
0d0ba3a410038e179b695446bb149cce6264e0abnd var call = "$context$path?actionLink=validateLocalJmxPort";
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd var portVal = "&port=" + $('localConfigJmxPort').value;
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd ie7fix++;
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd call = call + "&ie7fix=" + ie7fix;
60e9b3f37c1362c258c50c0fa29b2187a9e1580fnd AjaxUtils.call(call+portVal, localPortResponse);
}
function validateLocalRepPort() {
field = "localRepPort";
validate();
}
function validateExistingPort() {
field = "existingPort";
validate();
}
function validateExistingRepPort() {
field = "existingRepPort";
validate();
}
function enableExisting() {
multiServer = "true";
$('nextTabButton').disabled = true;
// controls for displaying step6
firstFAMInstance = false;
$('tab4').style.color = "#D3D3D3";
$('tab6').style.color = "#D3D3D3";
nextTab = 5;
document.getElementById("newInstanceOptions").style.display = "none";
document.getElementById("existingInstanceURL").style.display = "";
document.getElementById("replicationPorts").style.display = "none";
document.getElementById("existingLDAP").style.display = "none";
ie7fix++;
AjaxUtils.call("$context$path?actionLink=setReplication&multi=enable&ie7fix=" + ie7fix);
}
function disableExisting() {
enableNextButton();
multiServer = "false";
// controls for displaying step6
firstFAMInstance = true;
$('tab6').style.color = "";
$('tab4').style.color = "";
nextTab = 4;
document.getElementById("newInstanceOptions").style.display = "";
document.getElementById("existingInstanceURL").style.display = "none";
document.getElementById("replicationPorts").style.display = "none";
document.getElementById("existingLDAP").style.display = "none";
ie7fix++;
AjaxUtils.call("$context$path?actionLink=setReplication&multi=disable&ie7fix=" + ie7fix);
}
function setExternalFieldsDisplay(display) {
document.getElementById("login").style.display = display;
document.getElementById("password").style.display = display;
if (display == "none") {
document.getElementById("configStoreSSL").disabled = true;
document.getElementById("configStoreHost").disabled = true;
document.getElementById("configStoreHost").value = "localhost";
document.getElementById("adminport").style.display = "";
document.getElementById("jmxport").style.display = "";
} else {
document.getElementById("configStoreSSL").disabled = false;
document.getElementById("configStoreHost").disabled = false;
remoteDSHost = document.getElementById("configStoreHost").value;
document.getElementById("configStoreHost").value = remoteDSHost;
document.getElementById("adminport").style.display = "none";
document.getElementById("jmxport").style.display = "none";
}
}
function enableRemote() {
userStore = "external";
enableNextButton();
ie7fix++;
AjaxUtils.call("$context$path?actionLink=setConfigType&type=remote&ie7fix=" + ie7fix);
setExternalFieldsDisplay("");
}
function disableRemote() {
setExternalFieldsDisplay("none");
userStore = "embedded";
enableNextButton();
ie7fix++;
AjaxUtils.call("$context$path?actionLink=setConfigType&type=embedded&ie7fix=" + ie7fix);
}
function initConfig() {
if ("$DATA_STORE" == 'embedded') {
disableRemote();
} else {
enableRemote();
}
if ("$FIRST_INSTANCE" == "1") {
enableExisting();
}
}
function enableNextButton() {
if (userStore == "embedded") {
$('nextTabButton').disabled =
!isFieldOK('configStoreHost') ||
!isFieldOK('configStorePort') ||
!isFieldOK('configStoreAdminPort') ||
!isFieldOK('configStoreJmxPort') ||
!isEncryptionKeyOk() ||
!isFieldOK('rootSuffix');
} else {
var allFieldsValid = isFieldOK('configStoreHost') &&
isFieldOK('configStorePort') && isEncryptionKeyOk() &&
isFieldOK('rootSuffix') && isFieldOK('configStoreLoginId') &&
isFieldOK('configStorePassword') &&
(document.getElementById('configStorePassword').value != '');
if (allFieldsValid) {
ie7fix++;
AjaxUtils.call("$context$path?actionLink=validateSMHost&ie7fix=" + ie7fix,
validateSMHost);
} else {
$('nextTabButton').disabled = true;
}
}
}
function isEncryptionKeyOk() {
var value = escape($('encryptionKey').value);
return (value.length > 0);
}
function validateSMHost(response) {
if (response.responseText == "ok") {
$('nextTabButton').disabled = false;
$('configStoreHostStatusEx').innerHTML = "";
} else {
$('nextTabButton').disabled = true;
$('configStoreHostStatus').innerHTML = "";
$('configStoreHostStatusEx').innerHTML = errorImage +
'<small>' + response.responseText + '</small>';
}
}
function isFieldOK(field) {
var x = $(field + 'Status').innerHTML;
return (x == '') || (x.indexOf('ok.jpg') != -1);
}
YAHOO.util.Event.onDOMReady(initConfig);
</script>
<div style="margin-left:10px;">
<h1>$page.getLocalizedString("step3.title")<img class="pointer"
src="$context/assets/images/message.gif"/></h1>
<p>$page.getLocalizedString("step3.description")</p>
<input type="radio" id="existingNo" name="existingInstance"
value="false" $selectFirstSetup onclick="disableExisting();"/>
$page.getLocalizedString("create.new.instance")
<input type="radio" $selectExistingSetup id="existingYes" name="existingInstance"
value="true" onclick="enableExisting();"/>
$page.getLocalizedString("add.existing.instance")
<!-- EMBEDDED STORE PROPERTIES -->
<div id="configStoreProperties" style="width:620px;" >
<p id="allfields"><em>*</em>&nbsp;
$page.getLocalizedString("required.field.label")</p>
<b class="xtop">
<b class="xt1"></b>
<b class="xt2"></b>
<b class="xt3"></b>
<b class="xt4"></b>
</b>
<div class="headerBox">
$page.getLocalizedString("step3.sub.title")
</div>
<div class="bodyBox" style="height:290px;">
<span>
<!-- New Instances -->
<div id="newInstanceOptions">
<table class="temp">
<tr>
<td><label for="configStoreCustom">
$page.getLocalizedString("existing.instance.label")
</label></td>
<td>
<input type="radio" id="configStoreDefault" name="configStoreCustom"
style="margin-left:1em" value="false" $selectEmbedded
onclick="disableRemote();"/>
$page.getLocalizedString("step3.embedded.option")
<input type="radio" id="configStoreCustom" name="configStoreCustom"
style="margin-left:1em" value="true" $selectExternal
onclick="enableRemote();"/>
$page.getLocalizedString("step3.external.option")
</td>
</tr>
</table>
<!-- Embedded Store -->
<table class="temp">
<tr id="ssl">
<td><label for="configStoreSSL"><em>*&nbsp;</em>
$page.getLocalizedString("ssl.label")</label></td>
<td>
<input id="configStoreSSL" name="configStoreSSL"
type="checkbox" value="SSL" $selectConfigStoreSSL
onClick="APP.callDelayed(this, validateConfigStoreSSL)"/></td>
</tr>
<tr id="host">
<td><label for="configStoreHost"><em>*&nbsp;</em>
$page.getLocalizedString("host.name.label")</label></td>
<td>
<input id="configStoreHost" name="configStoreHost"
type="text" class="text" style="width:150px"
value="$configStoreHost"
onkeyup="APP.callDelayed(this, validateConfigStoreHost)"
onchange="APP.callDelayed(this, validateConfigStoreHost)"/>
<span id="configStoreHostStatus"></span>
<span id="configStoreHostStatusEx"></span>
</td>
</tr>
<tr>
<td><label for="configStorePort"><em>*&nbsp;</em>
$page.getLocalizedString("port.label")</label></td>
<td>
<input id="configStorePort" name="configStorePort"
type="text" size="5" maxLength="5"
value="$configStorePort"
onkeyup="APP.callDelayed(this, validatePort)"
onchange="APP.callDelayed(this, validatePort)"/>
<span id="configStorePortStatus"></span></td>
</tr>
<tr id="adminport">
<td><label for="configStoreAdminPort"><em>*&nbsp;</em>
$page.getLocalizedString("admin.port.label")</label></td>
<td>
<input id="configStoreAdminPort" name="configStoreAdminPort"
type="text" size="5" maxLength="5"
value="$configStoreAdminPort"
onkeyup="APP.callDelayed(this, validateAdminPort)"
onchange="APP.callDelayed(this, validateAdminPort)"/>
<span id="configStoreAdminPortStatus"></span></td>
</tr>
<tr id="jmxport">
<td><label for="configStoreJmxPort"><em>*&nbsp;</em>
$page.getLocalizedString("jmx.port.label")</label></td>
<td>
<input id="configStoreJmxPort" name="configStoreJmxPort"
type="text" size="5" maxLength="5"
value="$configStoreJmxPort"
onkeyup="APP.callDelayed(this, validateJmxPort)"
onchange="APP.callDelayed(this, validateJmxPort)"/>
<span id="configStoreJmxPortStatus"></span></td>
</tr>
<tr>
<td><label for="encryptionKey"><em>*&nbsp;</em>
$page.getLocalizedString("step2.encr.key")</label></td>
<td>
<input id="encryptionKey" name="encryptionKey"
type="text" class="text" style="width:200px"
value="$encryptionKey"
onkeyup="APP.callDelayed(this, validateEncKey)"
onchange="APP.callDelayed(this, validateEncKey)"/>
<span id="encryptionKeyStatus"></span></td>
</tr>
<tr>
<td><label for="rootSuffix"><em>*&nbsp;</em>
$page.getLocalizedString("root.suffix.label")</label></td>
<td>
<input id="rootSuffix" name="rootSuffix"
type="text" class="text" style="width:200px"
value="$rootSuffix"
onkeyup="APP.callDelayed(this, validateRootSuffix)"
onchange="APP.callDelayed(this, validateRootSuffix)"/>
<span id="rootSuffixStatus"></span>
</td>
</tr>
<tr id="login">
<td><label for="configStoreLoginId"><em>*&nbsp;</em>
$page.getLocalizedString("login.id.label")</label></td>
<td>
<input id="configStoreLoginId" name="configStoreLoginId"
type="text" class="text" style="width:150px"
value="$configStoreLoginId"
onkeyup="APP.callDelayed(this, validateConfigStoreLoginId )"
onchange="APP.callDelayed(this, validateConfigStoreLoginId )"/>
<span id="configStoreLoginIdStatus"></span>
</td>
</tr>
<tr id="password">
<td><label for="configStorePassword"><em>*&nbsp;</em>
$page.getLocalizedString("password.label")</label></td>
<td>
<input id="configStorePassword"
name="configStorePassword"
type="password" class="text" style="width:100px"
value="#if($store.password)$store.password#{end}"
onkeyup="APP.callDelayed(this, validateConfigStorePassword )"
onchange="APP.callDelayed(this, validateConfigStorePassword )"/>
<span id="configStorePasswordStatus"></span></td>
</tr>
</table>
</div>
<!-- Existing -->
<div id="existingInstanceURL" style="display:none">
<table class="temp">
<tr>
<td><label for="existingHost"><em>*&nbsp;</em>
$page.getLocalizedString("host.url.label")</label></td>
<td>
<input id="existingHost" name="existingHost" type="text"
class="text" size="60"
onkeyup="APP.callDelayed(this, validateHostName)"
onchange="APP.callDelayed(this, validateHostName)"/>
<span id="existingHostStatus"></span>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<small>$page.getLocalizedString("url.server.help")</small>
</td>
</tr>
</table>
</div>
<!-- replication ports -->
<div id="replicationPorts" style="display:none">
<small>$page.getLocalizedString("local.port.values")</small>
<table class="temp">
<tr>
<td><label for="localConfigPort"><em>*&nbsp;</em>
$page.getLocalizedString("local.port.label")</label></td>
<td>
<input id="localConfigPort" name="localConfigPort"
type="text" class="text" size="5" maxLength="5"
value="$localConfigPort"
onkeyup="APP.callDelayed(this, validateLocalConfigPort)"
onchange="APP.callDelayed(this, validateLocalConfigPort)"/>
<span id="localConfigPortStatus"></span>
</td>
<td><label for="localConfigAdminPort"><em>*&nbsp;</em>
$page.getLocalizedString("admin.port.label")</label></td>
<td>
<input id="localConfigAdminPort" name="localConfigAdminPort"
type="text" class="text" size="5" maxLength="5"
value="$localConfigAdminPort"
onkeyup="APP.callDelayed(this, validateLocalConfigAdminPort)"
onchange="APP.callDelayed(this, validateLocalConfigAdminPort)"/>
<span id="localConfigAdminPortStatus"></span>
</td>
</tr>
<tr>
<td><label for="localRepPort"><em>*&nbsp;</em>
$page.getLocalizedString("replication.port.label")</label></td>
<td>
<input id="localRepPort" name="localRepPort"
type="text" class="text" size="5" maxLength="5"
value="$localRepPort"
onkeyup="APP.callDelayed(this, validateLocalRepPort)"
onchange="APP.callDelayed(this, validateLocalRepPort)"/>
<span id="localRepPortStatus"></span>
</td>
<td><label for="localConfigJmxPort"><em>*&nbsp;</em>
$page.getLocalizedString("jmx.port.label")</label></td>
<td>
<input id="localConfigJmxPort" name="localConfigJmxPort"
type="text" class="text" size="5" maxLength="5"
value="$localConfigJmxPort"
onkeyup="APP.callDelayed(this, validateLocalConfigJmxPort)"
onchange="APP.callDelayed(this, validateLocalConfigJmxPort)"/>
<span id="localConfigJmxPortStatus"></span>
</td>
</tr>
<tr>
<td colspan="4">
<span id="replicationMessage"></span></td>
</tr>
<tr>
<td><label for="existingPort"><em>*&nbsp;</em>
$page.getLocalizedString("existing.port.label")</label></td>
<td>
<input id="existingPort" name="existingPort" type="text"
class="text" size="5" maxLength="5"
value="$existingPort"
onkeyup="APP.callDelayed(this, validateExistingPort)"
onchange="APP.callDelayed(this, validateExistingPort)"/>
<span id="existingPortStatus"></span>
</td>
<td></td><td></td>
</tr>
<tr>
<td><label for="existingRepPort"><em>*&nbsp;</em>
$page.getLocalizedString("existing.replication.port")</label></td>
<td>
<input id="existingRepPort" name="existingRepPort"
type="text" class="text" size="5" maxLength="5"
value="$existingRepPort"
onkeyup="APP.callDelayed(this, validateExistingRepPort)"
onchange="APP.callDelayed(this, validateExistingRepPort)"/>
<span id="existingRepPortStatus"></span>
</td>
<td></td><td></td>
</tr>
</table>
</div>
<!-- existing LDAP -->
<div id="existingLDAP" style="display:none">
<small>$page.getLocalizedString("existing.port.values.external")</small>
<table class="temp">
<tr>
<td><label for="existingStoreHost"><em>*&nbsp;</em>
$page.getLocalizedString("existing.ldap.label")</label></td>
<td><input id="existingStoreHost" name="existingStoreHost" type="text"
class="text" size="60" style="width:150px"
value="$existingStoreHost"
onkeyup="APP.callDelayed(this, validateHostName)"
onchange="APP.callDelayed(this, validateHostName)"/>
<span id="existingStoreHostStatus"></span>
</td>
</tr>
<tr>
<td><label for="existingStorePort"><em>*&nbsp;</em>
$page.getLocalizedString("port.label")</label></td>
<td>
<input id="existingStorePort" name="existingStorePort"
type="text" size="5" maxLength="5"
value="$existingStorePort"
onkeyup="APP.callDelayed(this, validatePort)"
onchange="APP.callDelayed(this, validatePort)"/>
<span id="existingStorePortStatus"></span>
</td>
</tr>
</table>
</div>
</span>
</div>
<div>
<b class="xbottom">
<b class="xbGray1"></b>
<b class="xbGray2"></b>
<b class="xbGray3"></b>
<b class="xbGray4"></b>
</b>
</div>
</div>
</div>