I am currently working on a project that has an existing DAO layer in place.
One of the domain models has 20 attributes, but only 10 of these are
editable via the web. The other 10 are set by back ground processes.

My question to the group, is what strategy to people take for this.

Currently I retrieve a record from the DB populate this object.

I then use this object on my web form, but do not set hidden fields for
values that are not editable.

When I save, the object only has 10 fields set, the others are null.

In my service layer before saving this object, I retrieve the existing one
(in case updates have been made since user edited) and I manually copy the
properties from the web version of the model to the dao model and save.

While it works fine, I am just wondering whether this is the right approach
or what do people generally do in this case?

Cheers
-- 
View this message in context: 
http://www.nabble.com/Working-with-existing-domain-model-classes-in-spring-mvc-tp15631877s2369p15631877.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to