You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sobkowski, Andrej" <An...@emergis.com> on 2002/03/22 15:05:45 UTC
[ANN] New ActionForm-to-Value Object (and back) mapper
Hello,
the new version of the Form-to-VO and VO-to-Form mapper is now available at
http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp
It allows you to perform in ONE line of code the mapping between
ExampleForm
+getLastName:String
+setLastName(String)
+getDateOfBirth:String
+setDateOfBirth(String)
+getYearsOfJavaExperience:String
+setYearsOfJavaExperience(String)
+getEmailAddresses:String[]
+setEmailAddresses(String[])
+getChild:ChildForm
+setChild(ChildForm)
+getChildren:ChildForm[]
+setChildren(ChildForm[])
and
ExampleVO
+getLastName:String
+setLastName(String)
+getDateOfBirth:Date
+setDateOfBirth(Date)
+getYearsOfJavaExperience:Integer
+setYearsOfJavaExperience(Integer)
+getEmailAddresses:String[]
+setEmailAddresses(String[])
+getChild:ChildVO
+setChild(ChildVO)
+getChildren:ChildVO[]
+setChildren(ChildVO[])
by simply writing FormToVOMapper.map(exampleForm, new ExampleVO()) or
VOToFormMapper.map(exampleVO, new ExampleForm()).
New features/bug fixes:
- Date format is now configurable via System properties
- fixed support for nested elements
- added support for Boolean (any new type can be added in less than 2
minutes)
Future enhancements:
- support for primitive types
- support for nested Collections
Documentation is extensive both on the HTML page and in the code. JUnit
tests are provided with the distribution.
It's still a "0.9beta" release because I wanted to get the enhancements in
before the 1.0 but the code has been running with no problems in our project
for 4 months now.
Any feedback is appreciated :)
Andrej