Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

some better feedback on properties change

Lotus3e61287326e4
diff --git a/htroot/ConfigProperties_p.html b/htroot/ConfigProperties_p.html
index 98f7a682c..23b177950 100644
--- a/htroot/ConfigProperties_p.html
+++ b/htroot/ConfigProperties_p.html
@@ -27,10 +27,15 @@
node=node.nextSibling;
}
}
+ function clear_form() {
+ document.getElementById("key").value="";
+ document.getElementById("value").value="";
+ filterList();
+ }
//-->
</script>
</head>
- <body id="ConfigAdvanced">
+ <body id="ConfigAdvanced" onload="filterList()">
#%env/templates/header.template%#
#%env/templates/submenuConfig.template%#
@@ -51,8 +56,9 @@
</select><br />
<form action="ConfigProperties_p.html" method="post" accept-charset="UTF-8">
<fieldset>
- <input type="text" id="key" name="key" size="40" onkeyup="filterList()" />:<input type="text" id="value" name="value" size="40" />
- <input type="submit" value="Save" />
+ <input type="text" id="key" name="key" size="40" onkeyup="filterList()" value="#[keyPosted]#"/>:<input type="text" id="value" name="value" size="40" value="#[valuePosted]#" />
+ <input type="submit" value="Save" />&nbsp;
+ <input type="button" value="Clear" onclick="clear_form()" />
</fieldset>
</form>
diff --git a/htroot/ConfigProperties_p.java b/htroot/ConfigProperties_p.java
index 3b60a51b2..5893ca064 100644
--- a/htroot/ConfigProperties_p.java
+++ b/htroot/ConfigProperties_p.java
@@ -44,15 +44,19 @@ public class ConfigProperties_p {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
- String key;
+ String key = "";
+ String value = "";
//change a key
if (post != null && post.containsKey("key") && post.containsKey("value")) {
key = post.get("key").trim();
+ value = post.get("value").trim();
if (key != null && !key.isEmpty()) {
- env.setConfig(key, post.get("value").trim());
+ env.setConfig(key, value);
}
}
+ prop.putHTML("keyPosted", key);
+ prop.putHTML("valuePosted", value);
Iterator<String> keys = env.configKeys();