OK, that makes sense. I'm not sure what the normal struts usage pattern is. I think that it makes sense to have one ActionForm for each logical request, but maybe other people don't do that. So, I agree with your idea of OzPage. (Also, I think that ActionForms should only be used to pass information from the browser to the Action. You shouldn't use ActionForms to pass arbitrary data from java code to JSP code, except for pre-populating form fields.)

Yes, I agree that it's better to have a framework that differentiates between form-processing and page-preparation. Sometimes struts users do this by chaining, ie AddVendorAction calls DisplayVendorDetailAction. However, you have to hack the struts code to do chaining (see http://wiki.apache.org/struts/ForwardingWithDifferentParameter)

Regarding struts-config.xml: in OzStruts, it's too bad that you have to register OzPage (ActionForm) and register Listener (Action) separately. Conceptually, they are the same thing, right? I just want to say something like this:

<ozPage
input="/webpage/ozstruts/vendor/addVendor.jsp"
type="net.sourceforge.optionzero.ozstruts.sample.webapp.ozstruts.vendor.AddVendorPage">
<forward name="VendorDetailPage" path="/webpage/ozstruts/vendor/vendorDetail.jsp"/>
<forward name="AddVendorPage" path="/webpage/ozstruts/vendor/addVendor.jsp"/>
</ozPage>



Bill

Tak Yoshida wrote:

Hi Bill,



Then AddVendorAction takes AddVendorForm as input, and then creates a
DisplayVendorDetailForm in the request context before forwarding to
displayVendor.jsp.


Thanks for your feedback.

You're right, but you're doing it by yourself in application code.
This is one of the main idea of OzStruts.
And I think this task should be done by framework, which makes applicaitn code 
consistence.
In Struts, the framework only makes AddVendorForm available to vendorDetail.jsp.
In OzStruts, you don't have to set DisplayVendorDetailForm into request 
attribute manually.
Btw, I don't think it's normal practice in exisiting Struts application 
development,
or I just misunderstood the reality of the Struts development.

Page-driven programming is also important to me,
because I don't want to see struts-config to maintain the code.
To make this concept into code,
I don't want to see request.setAttribute() in my application codes.

In validation error transition, pre-population is also a key feature of 
OzStruts.
You can say you can do it in each Action calss or some other techique.
But I also would like to have consistence way by framework,
then prepareRequiredProperties() with transitionContext object is there.
I guess it's similar to prepare() method in Shale.

Thanks,
Tak

---------------------------------------------------------------------
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