Bill,

Thanks for the feedback. I should re-write this, it's not clear.

>> Here is an example from OzStruts sample application. VendorDetail.jsp 
>> has two
>> source pages, one is vendorSearch.jsp, and another is addVendor.jsp. In
>> addVendor.jsp to vendorDeatil.jsp transition, ActionForm must have 
>> properties to
>> get http request from addVendor.jsp, and rendering properties for 
>> vendorDeatil.jsp
>> and addVendor.jsp for error. Thus ActionForm will have properties for 
>> two pages.
>> On the other hand, the transition from vendorSearch.jsp is just http 
>> link with single
>> destination page, so ActionForm don稚 have to consolidate properties 
>> for the two
>> pages. It looks hard for junior developers isn稚 it?
>
>***Are you saying that (in normal Struts) the "submit" button for 
>vendorSearch.jsp and the "submit" button for addVendor.jsp both call the 
>same Action (and the same ActionForm)?
>
No, it's different.
What I would like to say is, to select the ActionForm on mapping depends on how 
many destination 
page on the http request.

vendorSearch.jsp just has a link <a href> to display vendorDeatil.jsp.
In this single destination case, we use the ActionForm that has properties to 
render destination 
page (vendorDeatil.jsp), and don't have to have any propertis to render source 
page 
(vendorSearch.jsp).
The a action is ShowVendorDetailAction with VendorForm, we don't need 
VendorSearchForm.

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.

Tak

-- 
Tak Yoshida mailto:[EMAIL PROTECTED]

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

Reply via email to