aspose file tools*
The moose likes Struts and the fly likes multiple buttons (with or without forms) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "multiple buttons (with or without forms)" Watch "multiple buttons (with or without forms)" New topic
Author

multiple buttons (with or without forms)

Jon Bbbb
Greenhorn

Joined: Apr 27, 2009
Posts: 2
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

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Apr 27, 2009
Posts: 2
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

Joined: Sep 29, 2008
Posts: 12617

DispatchAction or LookupDispatchAction?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple buttons (with or without forms)