-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Célio,

Célio Cidral Junior wrote:
> The problem happens when the user
> is *altering* an existing customer (creating a new customer works
> fine), more specifically when the user is submitting changes from the
> form to an existing customer object (alongside with an existing id);
> in that case, the id must be set before getCustomer() is called,
> otherwise a new customer will be created with zero id. Loading the
> form with an existing customer works fine. Submitting changes to it is
> where the problem resides. The idea behind getCustomer() is to
> abstract the retrieving of the customer object wherever it's called
> along the action's code so that I don't have to care about whether
> it's an existing customer or not.

I agree with Dave: you're trying to do too much in your forms. You
should try to stick to a form bean that does nothing other than shuttle
data to and from the form. Your action should be invoking database
fetches and things of that nature, copying the form data from the form
bean to your DAOs, etc.

I think you're doing too much at once, and paying the price for it.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFuRdK9CaO5/Lv0PARAvrCAJ49E8WINtd8vt6wfKbXfHcIhUK/zQCeNHWI
Y+X+A0efqwOtHftlT54uj8M=
=P8ks
-----END PGP SIGNATURE-----

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

Reply via email to