[ http://issues.apache.org/struts/browse/WW-1347?page=comments#action_37651 
] 

Niall Pemberton commented on WW-1347:
-------------------------------------

Although DynaActionForm has the getMap() method (and LazyDynaBean) - not all 
implementations do, including BasicDynaBean. The problem as well with the way 
get Map() has been implemented (in both DynaActionForm and LazyDynaBean) is to 
expose the DynaBean's internal Map circumventing the DynaBean's "type safety". 
While this isn't an issue for reading properties, it will be if S2 uses the Map 
to populate using OGNL. The solution to this is for the getMap() method to 
return a Map which decorates the DynaBean, calling the DynaBean's get/set 
methods - I attached such an implementation to the following issue recently:

   http://issues.apache.org/jira/browse/BEANUTILS-185

The problem is BeanUtils is in serious need of some TLC (85 open issues) and 
looks like its heading to a "dormant" status (if it isn't already). IMO it has 
also got too large and probably should be split into several smaller components 
- including splitting out DynaBeans. I almost proposed splitting out DynaBeans 
recently, but that would invlove at least one BeanUtils release and I'm not 
sure I have the appetite for it.

The other attempt to resolve the issue that other technologies outside of 
BeanUtils don't recognise DynaBeans was Laurie's change to use cglig to create 
to create a dynamic proxy for DynaBeans (STR-2596) that got backed out 
(STR-2671). The motivation for this (and for BEANUTILS-185) was that having to 
specify "fooForm.map.barProperty" seemed unnatural rather than 
"fooForm.barProperty". Part of me thinks that DynaBeans have had their day, 
since they were invented before all the EL technologies arrived on the scene. I 
think with hindsight it would have bean better to stick with a Map (?MapBean?) 
and used a "MapClass" to control property types.



> SAF1 Features to Implement
> --------------------------
>
>          Key: WW-1347
>          URL: http://issues.apache.org/struts/browse/WW-1347
>      Project: Struts 2
>         Type: Task

>   Components: Documentation
>     Reporter: Ted Husted
>      Fix For: 2.0.0

>
>  
>  * Wildcard Action Mappings - Complete
>  *  DynaForm as Model Object
>  *  Extends for action mappings

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to