We instantiate an ActionForm from our model bean to move data from business to struts.
In each ActionForm, we have a populate method that fills in various pieces of a model bean for that particular form.
Is this fairly typical?
Thanks.
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
posted
0
The approach you describe is pretty common. One that I use quite often is the "Value Object" or "Transfer Object" pattern. Using this pattern, you create objects that belong neither to the view, nor to the model, but are used to shuttle information to and from the two. When using struts, I sometimes find it convenient to embed the value object into the form as a property, and then use nested tags to get at the information.
Here's a link with some good information about this and other J2EEpatterns.