| Author |
Struts 1.2.4 - POJO Support
|
Matthew Marquand
Ranch Hand
Joined: Dec 19, 2002
Posts: 32
|
|
The importance of our ActionForms is decreasing over the 2 years that our application has been in production. Most of our ActionForms are nothing more than a holder of a presentation-level POJO bean "delegate" that the tiles use directly. So I was glad to see that Struts 1.2.4 has better support for using POJO beans as a direct substitute for coding up an ActionForm. I have looked at the source to see how this is being accomplished and saw that the POJO is wrapped with a WrapDynaBean and that bean is wrapped with a BeanValidatorForm. I have also seen the comment in BeanValidatorForm above the getInstance method that you cannot get direct access to the POJO from the Action until struts 1.2.4 upgrades to BeanUtils 1.7.0 or greater. That's all understandable. However, my question is: Is there a compelling reason why BeanValidatorForm doesn't define a setInstance method in addition to a getInstance method? Many of our Actions obtain a presentation-level POJO and without setInstance we would have to use PropertyUtils or something like that to copy the properties into the one hanging off the form.
|
 |
 |
|
|
subject: Struts 1.2.4 - POJO Support
|
|
|