Strange behavior with strings that are submitted via a form
Franz Philipp Moser <[email protected]> Fri, 17 Aug 2007 11:13:25 +0200
| Newsgroups | gmane.comp.java.helma.general |
|---|---|
| Message-ID | <[email protected]> |
Hi list,
twoday I expirienced a strange problem with simple input fields. My form:
{{{
<form method="get" action="">
Name: <input type="text" name="einname" /><br />
Nummer: <input type="text" name="nummer" /><br />
<input type="submit" name="submit" value="Go" />
</form>
}}}
Normaly I check if we have a multi select: with the following code in helma:
{{{
for (var i in req.data) {
res.debug("Formfield: " + i);
res.debug("data[i+_array]: " + data[i + "_array"]);
res.debug("data[i]: " + data[i]);
if (req.data[i + "_array"]) {
// do something with multiselect
} else {
// do something with normal text
}
}
}}}
Intresting thing after debuging is that the submited req.data.einname
has a equivalent req.data.einname_array!
Output from res debug:
{{{
Formfield: einname
data[i+_array]: [Ljava.lang.String;@41e525
data[i]: philipp
}}}
Can somebody tell me if this is a bug and if not, how to test for
multiselects "the new way" ;)
cu Philipp