Have you tried implementing the Preparable interface? This allows you
to fetch your object from the database and only the fields you pass in
on the request will be updated. See UserAction for an example.

Matt

On Tue, Apr 1, 2008 at 9:11 AM, tibi <[EMAIL PROTECTED]> wrote:
> 2.0M5
>  struts2.0 spring hibernate
>
>  thanks,
>
>  tibi
>
>
>
>  Matt Raible wrote:
>  > Which version of AppFuse and which web framework are you using?
>  >
>  > On Tue, Apr 1, 2008 at 4:12 AM, tibi <[EMAIL PROTECTED]> wrote:
>  >
>  >> hi list,
>  >>
>  >>  im not sure how to update an user when i only want to update one or two
>  >>  fields.
>  >>  using struts spring hibernate
>  >>
>  >>  lets say i only want to change the name.
>  >>  i make a form with hidden field with id and a normal field with name.
>  >>
>  >>  when i enter my save method i have a user with only an id and name. and
>  >>  the other fields like password version etc. are empty.
>  >>
>  >>  should i get the old userfrom the db and copy the name from the new one
>  >>  to the old one and update it??
>  >>  should i put all fields hidden in my form?
>  >>  should i save the user into the session?
>  >>
>  >>  thanks,
>  >>
>  >>  tibi
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  For additional commands, e-mail: [EMAIL PROTECTED]
>  >>
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to