I use the approach outlined in http://www.michaelmcgrady.com/button/jsp/button_talk.jsp. In summary each button, when clicked, puts their value in a different request paramater - by looking for the presence of a partcicular paramater a different dispatch method can be called.
This approach should be relatively easy to use with non dispatch actions with a few changes to the RequestProcessor. HTH, Paul > -----Original Message----- > From: Scott Purcell [mailto:[EMAIL PROTECTED] > Sent: 23 March 2005 20:59 > To: user@struts.apache.org > Subject: html: tag four buttons, one action problem > > > Hello, > I have a form, lets say that has a select list on it. > Under it I have the ability to > [edit], [delete], [modify] or [cancel]. > > Each of these buttons goes to a different <action /> > > but the form page is set for just one of the actions. And to > top this off, I cannot do a href_link, I need to submit the > form to get the selected value from the form. > > We are using links, but they are css links (See below). One > of my guys said we could just use the javascript (see last > link) and then change the action of the form, but I was > hoping there was a cleaner way.** > > Here is the actual page links. They appear to only do a href > and not a submit, but even if they did submit, I need to > change action. > The last one calls a javascript, changes the action and > submits, but I feel it is not clean. > Is there a cleaner way to handle this. > > *****Optimal would be a tag that submits to a certain action:****** > > > <html:link action="/newUser" styleClass="mainLink">New > User</html:link> > <html:link action="/editUser" styleClass="mainLink">Edit > User</html:link> > <html:link action="/deleteUser" > styleClass="mainLink">Delete User</html:link> > <html:link action="/mainAdmin" > styleClass="mainLink">Cancel</html:link> > <html:link href="javascript:editUser();" > styleClass="mainLink">Foo Bar</html:link> ** > > > I am sorry for all questions in this regard, but I could use > some help. > > Scott > > > Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]