• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Don't need an ActionForm !

 
Dave Hewitson
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple page, that just shows some stuff and allows the user to press a button and go back to the page they came from.
So, I don't need an ActionForm, but Struts forces me to have one if I want to use <html:form.......>
Now I can just use a normal <form...>, but, is there a recommended way of dealing with this scenario?
TIA
Dave.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm not sure if there is a "recommended" way, but one thing you could do is use <html:button> and have it call some javascript. The javascript method called would direct the user to the appropriate action, whose path can be rendered using <html:rewrite>. I'm assuming of course that there is some reason you specifically want to use a button, and not an image button ( <html:image> ), or some kind of link ( <html:link> ).
 
Dave Hewitson
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to use a button only for consistency in the application.
I could just create an ActionForm with nothing in, but it seems odd to have to do this.
Or maybe, as you thought, have an image of a button with a link to the approriate action.
Thanks
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic