Hi Tak.

>addVendor.jsp has a "submit" button to send <form> with <input> parameters to 
>create a Vendor,
>and application routes to vendorDetail.jsp when it's sucsessfuly done. It also 
>routes to 
>addVendor.jsp when it's failed to add or validation errors.
>In this multiple destination case, the ActionForm must have properties to 
>render all the 
>destination pages (both vednorDetail.jsp and addVendor.jsp).
>The a action is AddVendorAction with VendorForm. And now VendorForm gets fat.
>  
>
Why do you say that VendorForm needs to contain properties to render two
pages? I don't think that is necessary.

The VendorForm should just contain the information to create a new
vendor (vendor name, address, etc.). It shouldn't have properties to
render vendorDetail.jsp. I would create two separate ActionForms:
AddVendorForm and DisplayVendorDetailForm. AddVendorForm only contains
vendor name/address. DisplayVendorDetailForm only contains vendor id.
Then AddVendorAction takes AddVendorForm as input, and then creates a
DisplayVendorDetailForm in the request context before forwarding to
displayVendor.jsp.

Bill

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

Reply via email to