some better feedback on properties change

pull/1/head
Lotus 13 years ago
parent 96ac95cff9
commit 3e61287326

@ -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>

@ -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();

Loading…
Cancel
Save