This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Server side validation question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Server side validation question" Watch "Server side validation question" New topic
Author

Server side validation question

Vito Andolini
Greenhorn

Joined: Jun 19, 2007
Posts: 10
I have an action mapping that displays a page with a form. The action gathers some dynamic data for drop-down lists, etc.

The form is submitted, but with errors, and validation is configured to run. I understand that I can include an "input" attribute for the action mapping so that the form could be redisplayed for the user. But I need to run the action again, not just display the form, because the action needs to gather the dynamic data for the form.

Any idea how this can be done?

Thanks very much...
Vito Andolini
Greenhorn

Joined: Jun 19, 2007
Posts: 10
Nevermind, figured it out!

if you set the inputForward attribute on the controller to true:



you can set the input attribute on the action to be an Action.forward, which allows you to forward to another action.



 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Server side validation question