You shouldn't use ActionForms to pass arbitrary data from java code to JSP code, except for pre-populating form fields.)


Could you please explain with example for this?
I'm not sure what "pass arbitrary data from java code to JSP code" means?


For example, suppose that there's a page to edit the information about an existing vendor. IE, a screen shows up with the current vendor's address, and you can change it and save it. Before the application displays editVendor.jsp, it creates an EditVendorForm and pre-populates it with the current vendor's address. Then the user submits the EditVendorForm with the new values. This is a typical input/output form, right? But what if the editVendor.jsp page also displays some other information, like a navigation menu. Some programmers might put the navigation menu information as part of the EditVendorForm . But that's bad style because the navigation menu is not part of the user's input.

No, Page registration and listener registration is different.
And I don't think it's so bad, becasue I didn't change anything from Struts.

Page registration is Form registration.
<form-bean name="AddVendorPage" type="foo.bar.AddVendorPage"/>

Listener registration is action definition.
<action path="/blah/blah/addVendor"
name="AddVendorPage"
This is exactly the same as we have now.


Right, it's the same as struts. And it's good because it doesn't break existing struts configurations. It just seems like extra typing. For example, the class name for every action is the same. Why should I type it over and over again? But that's the way struts works, so, it can't be helped.




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



Reply via email to