Thanks a lot for your quick reply.
Actually i had already done exactly what you are suggesting (see my previous post).
Maybe i'll be more specific - i have a map(representing the application configuration parameters) whose keys type is of my own enum type. The map values are just of type object. I want to have a form representing this map.
As for my form command object, i'm using some MapCommand object that holds the original map
Code:
public class MapCommand {
private Map map;
public void setMap(Map map) {
this.map = map;
}
public Map getMap() {
return this.map;
}
}
The map keys are of type ConfigParam -
Code:
public enum ConfigParameter {
activeAlertsExpirationDays(7);
private Object defaultValue;
private ConfigParameter(Object defaultValue) {
this.defaultValue = defaultValue;
}
public Object getDefaultValue() {
return defaultValue;
}
in my jsp form i want to use something like this...
Code:
<spring:bind path="command.map['activeAlertsExpirationDays']">
...but it doesn't work
Is there a way to use spring BindTag for binding form fields to map-entries whose keys are not strings?