exception with automatic formbean population
"Emmanuel" <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
I use a formbean that retrieves information passed in a form, like this :
public class InfoFormBean extends StrutsCXValidatorForm {
..
private final Map values = new HashMap();
public void setValue(String key, Object value) {
logger.debug("key:"+key);
values.put(key, value);
}
public Object getValue(String key) {
return values.get(key);
}
..
}
##and my form looks like :
<form ...>
<input name="value(key1)"
type="text" />
<input name="value(prop1)"
type="text" /> ...
</form>
##The formbean is populated alright. The associated action is called and execute is code also.
##But after the action executes its forward to another page, I get the following exception :
2004-01-10 22:04:02,158 DEBUG - [StrutsCXStandardDocumentBuilder] CONSTRUCT request Parameter: action = UPDATE
2004-01-10 22:04:02,158 DEBUG - [StrutsCXStandardDocumentBuilder] CONSTRUCT request Parameter: value(key1) = townname
MonitorFilter::Error: The name "value(key2)" is not legal for JDOM/XML elements: XML names cannot contain the character "(".
MonitorFilter::A web application object caused an exception
MonitorFilter::org.jdom.IllegalNameException: The name "value(key2)" is not legal for JDOM/XML elements: XML names cannot contain the character "(".
at org.jdom.Element.setName(Element.java:217)
at org.jdom.Element.<init>(Element.java:145)
at org.jdom.Element.<init>(Element.java:158)
etc....
##I tried to reset the formbean before doing the forward, but the error is exactly the same.
I do not need this information (value(key2)) anymore at that time.
How could I get rid of that ?
Thanks in advance.
Emmanuel
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.555 / Virus Database: 347 - Release Date: 23/12/2003