>From an earlier thread, I think this works:

        <html:submit property="action">
            <bean:message key="button.add"/>
        </html:submit>

But you need some mapping scheme if you don't know the language of the
string that will be returned.

I noticed that Ted Husted seems to lean towards including separate
"formlets" for each button, with the necessary parameters for the action in
hidden fields. Ted, care to comment on the benefits of that approach?

Lee

-----Original Message-----
From: emmanuel.boudrant [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 10:21 AM
To: Struts Users Mailing List
Subject: Re: which button pressed?



 Hi,
 
I suggest you to use : <html:submit property="propertyname"
value="buttonname"/>
ex: 
<html:submit property="myAction" value="add"/>
<html:submit property="myAction" value="del"/>
and in Action class, to determine witch button is pressed: 
String button = request.getParameter("myAction");
if ( button.equals("add") ) { ... }
 
But I don't know if <html:submit property="propertyname"
value="</bean:message ... />"/> work ?
  M�ris Orbid�ns <[EMAIL PROTECTED]> a �crit : 
Hello all

I have several submit buttons like this:




key="button.prev"/>
key="button.next"/>
key="button.save"/>
key="button.delete"/>
key="button.add"/>



The question is: How to determine which one has been pressed ?


Maris Orbidans



--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Yahoo! Courrier -- Une adresse @yahoo.fr gratuite et en fran�ais !

Reply via email to