Issue 11675
Test: Ignore
11675
Reporter: kbraak
Assignee: kbraak
Type: Bug
Summary: Test: Ignore
Priority: Major
Resolution: Invalid
Status: Closed
Created: 2012-08-15 16:39:49.952
Updated: 2013-01-15 14:40:04.459
Resolved: 2012-09-14 17:30:14.556
Description: I have written a very simple Action, and freemaker template so that you can replicate my problem.
My Action is as follows:
{code:title=TestAction.java|borderStyle=solid}
public class TestAction extends BaseAction {
private Map tmap = new TreeMap();
@Override
public void prepare() throws Exception {
super.prepare();
tmap.put("Animalia", "");
tmap.put("Ani_malia", "");
tmap.put("Ani:malia", "");
tmap.put("Ani-malia", "");
tmap.put("Ani%malia", "");
tmap.put("Ani+malia", "");
}
@Override
public String execute() {
return SUCCESS;
}
public Map getTmap() {
return tmap;
}
}
{code}
It prepares a TreeMap with some entries having only a String key, and an empty String value.
The following freemarker template displays the keys, and allows the user to save a new value for each one:
{code:title=test.ftl|borderStyle=solid}
{code}
Unfortunately, after entering new values for each key and submitting the form, the only keys that have values successfully saved are:
Animalia
Ani_malia
On the other hand, the following keys do NOT have values successfully saved:
Ani:malia
Ani-malia
Ani%malia
Ani+malia
Indeed the presence of such non-word characters breaks the OGNL parsing of the Map's String key.
To be sure no unwanted interception is occurring, I am using the most basic struts.xml configuration:
{code:xml}
/WEB-INF/pages/portal/test.ftl
{code}
]]>
Author: kbraak@gbif.org
Comment: was just a test to try some formatting.
Created: 2012-09-14 17:30:14.58
Updated: 2012-09-14 17:30:14.58