This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Struts and the fly likes Passing parameters between forms and flow (Struts 1.3) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Passing parameters between forms and flow (Struts 1.3)" Watch "Passing parameters between forms and flow (Struts 1.3)" New topic

Passing parameters between forms and flow (Struts 1.3)

Fran Cricket

Joined: Nov 03, 2012
Posts: 9
I have form1 in page1.jsp and form2 in page2.jsp.

The form1 contains a radio button group and it doesn't have validation.

The value of the radio button selected is used to query the database (via an Action called Load) and build the form2 in page2.jsp (for example in form2 is displayed a radio button group, which labels and values are retrieved from the db).

The form2 has validation (via validate() method of a ValidatorAction). If the validation fails, the form2 must be displayed again with errors (Load Action must be called again to rebuild the form). Instead, if the validation goes well, another page, page3.jsp, must be displayed.

I would a basic example or a link to an example, which shows a similar flow between Action, ActionForm, ValidatorAction... and the struts-config.xml

Basically, the two form call the same Action to build the form2.
wood burning stoves
subject: Passing parameters between forms and flow (Struts 1.3)