File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Usage of Both DynaValidatorForm and DispatchAction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Usage of Both DynaValidatorForm and DispatchAction" Watch "Usage of Both DynaValidatorForm and DispatchAction" New topic

Usage of Both DynaValidatorForm and DispatchAction

Gangrade Sumit

Joined: Jan 07, 2004
Posts: 3
I am planning to use DynaValidatorForm(for validation framework purpose) and DispatchAction(multiple methods in same Action class).
I am not sure whether its possible to impliment both of them together.
Thanks in advance !
sandy gupta
Ranch Hand

Joined: Jan 30, 2001
Posts: 228
Hey Sumit,
This is absolutely possible. You have to understand that the dynavalidatorform is a form bean which is used to store the information being transferred betn server and client and the action is the controller which controls the application flow so there is no reason that one can not be mixed with the other.
DispatchAction is an action class that uses method names for choosing which method to execute (selective execution) but the validation fwk uses the path specified in the struts-config.xml to validate irrespective of the action class and the method name used.
So you should definately be able to use it.
Let me know if you have problems doing this.

Rick Hightower
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
no problem.
You can use DynaValidatorForms with DispatchActions. You should get a book on Struts.
This article covers DispatchAction and other Actions. It is a book excerpt from Professional Struts Wrox book.
I suggest the Wrox book on Struts..... Hmmm.... I think it is called Professional Struts by James somebody and Richard somebody else. It has this great chapter on using the Validator Framework, DynaActionForms and other great stuff. (Warning: Evil author promoting his own book)

"When I first started with struts, I read several pieces on the subject, but none of it "jelled" for me...that is up until I read this book." Reviewer from Amazon.
Nov 19, 2003 A review from Boston, USA

It's a great book for beginners and others
This book is really amazing and I have referenced 2,3 other books for struts, but this one is the best. The concept of 'struts' is beautifully explained in a very simple way. I surely recommend this book! Reviewer from BookPool.

Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
I agree. Here's the link:
subject: Usage of Both DynaValidatorForm and DispatchAction
It's not a secret anymore!