|
From: Seth L. <se...@eh...> - 2004-03-17 18:23:44
|
Rim, Mark wrote:
> jozsa,
>
> well, for now, i think the short answer is yes. you do have to manually parse
> request parameters. otherwise, you could look through some source code and
> override methods at just the right points. but manual parsing might be easier.
>
> it looks like the issue is in the bean framework and not in the web stuff.
> although you can "get" map values by key using the BeanWrapper, you cannot set
> them. for example,
>
> MapBean tb = new MapBean();
> BeanWrapper bw = new BeanWrapperImpl(tb);
> tb.getMap().put("key1","value1");
> # the following works
> assertEquals("value1", bw.getPropertyValue("map[key1]"));
> # the next statement fails
> bw.setPropertyValue("map[key1]","value2");
>
> since mvc bindings (probably) depends on the bean framework, this is the
> likely cause of your pain. this may be by-design or a bug. i raised the issue
> on the developer mailing list during a bout with insomnia last night.
What is the current status on this issue for a 1.0 release? Do the
developers feel this is an issue to be fixed?
Judging from the amount of questions related to this issue found in the
forums and mailing lists (including my own) I feel this a feature worth
implementing.
It provides some symmetry with how getPropertyValue works. Also, many
of Spring's MVC users are Struts converts. The above functionality is
present in Struts, and having it in Spring would make porting those
applications to Spring easier and more straight forward.
If this functionality won't be added for 1.0, it would be very helpful
to have a workaround posted.
There are many patches for this, including my own, that are good
starting points. Most are labeled "hacks" so having the developer's
feedback would be very useful. :)
Thoughts or comments?
Thanks!
Seth
|