• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

multiple buttons (with or without forms)

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DispatchAction or LookupDispatchAction?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic