aspose file tools*
The moose likes Struts and the fly likes Struts Form with only Submit Form Elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Form with only Submit Form Elements" Watch "Struts Form with only Submit Form Elements" New topic
Author

Struts Form with only Submit Form Elements

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

I have a form and basically it is for verification of a DB lookup. So all it does is display some data from the DB. The only real form elements are the Continue and Cancel buttons. Am I still required to have an ActionForm/DynaActionForm for this form?


GenRocket - Experts at Building Test Data
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Only if you want it to work. <Kidding/>
There's ways of getting around it. Javascript would be one.
I think the benefits of keeping navigation in struts-config outweigh the costs of an extra action and actionform, no matter how trivial they seem.
All you need is a getButton/setButton in the form and a
forward = mapping.findForward(myForm.getButton());
in the action.
Then just map your struts-config accordingly, with a "Continue" and "Cancel"


A good workman is known by his tools.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Thanks Marc.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Form with only Submit Form Elements