• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple buttons (with or without forms)

 
Jon Bbbb
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!
 
Seetharaman Venkatasamy
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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DispatchAction or LookupDispatchAction?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic