I would like to know the best way to place data into the properties field for composed classes.
Lets say I have a class User who has a reference to class Address.
If I was using the spring the recommendation is to use the domain object inside the view layer and data will go directly into the model. So in this case I can map the view layer directly into both the user and address in 1 go.
How should I do it if I was not using spring. Should I have to write methods in my user class to say I am registering an Address and then pass the address object over for data collection.
Joined: Jul 26, 2007
Sorry one more thing I forgot to mention. What I want to know is whether setting data with the spring approach where everything is wired together is that a correct approach? Or should i be populating each object separately and then have a method inside my user class to add the address object