Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

multiple buttons (with or without forms)  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm trying to get my pages to have multiple submit buttons and am having a hard time finding any concrete example.

here is what i want to do:

i have 4 pages: main, list, confirm, logout

confirm has three buttons, cancel, go back, submit
cancel leads to main
go back leads back to list
submit leads to logout

cancel and submit work fine, by default, with the struts that i've got setup
however, despite all the things i've tried, i can't seem to get the 'go back' button to work. basically, i need to find a way for the action class to notice what submit button is being pressed and change the struts-forward based on that.

any tips/sample code?

thanks!
 
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jon Bbbb wrote: i need to find a way for the action class to notice what submit button is being pressed and change the struts-forward based on that.



<html:button> or <html:submit> has value attribute
 
Jon Bbbb
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

seetharaman venkatasamy wrote:

Jon Bbbb wrote: i need to find a way for the action class to notice what submit button is being pressed and change the struts-forward based on that.



<html:button> or <html:submit> has value attribute



how do you use said value attribute to handle page actions?
 
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DispatchAction or LookupDispatchAction?
 
You have to be odd to be #1 - Seuss. An odd little ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!