File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes validation=false Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation=false" Watch "validation=false" New topic
Author

validation=false

Sanjay Virkar
Greenhorn

Joined: Apr 03, 2005
Posts: 19
Do we have to create form bean even when you don't need it?

On my form I have only one button and no data entry field so no need for validation. Can I bypass creation of the ActionForm completely?
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Sure. You do not have to create one if there is no need for it.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Bosun's statement needs to be qualified a bit. While it's true you can have an Action without an ActionForm defined for it, you cannot specify such an action in an <html:form> tag. You can only call such an action as URL (e.g. myAction.do).

One option would be to use the plain HTML <form> tag specifying "myAction.do" as the action. If you still want to use the <html:form> tag but don't want to create an Action form, simply declare the DynaActionForm class as the Actionform.


Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: validation=false