Hi Marcos,
In my understanding you can use a String instead of a boolean:
Action:
private String submit;
public void setSubmit(String submit) {
this.submit = submit;
}
And in the JSP:
<s:submit name="submit" value="Save" />
<s:submit name="submit" value="Delete" />
Note there is a bug in 2.0.9 that this doesn't work for ajax-themed submit
buttons.
Regards
Jason
-----
Falun Dafa Truth - Compassion - Forbearance
A mind & body practice under persecution in China
http://www.faluninfo.net
-----Original Message-----
From: Marcos Mendonça [mailto:[EMAIL PROTECTED]
Sent: Thursday, 20 September 2007 6:34 AM
To: Struts Users Mailing List
Subject: [struts2] Button pressed
Hello
I've tried following this
http://struts.apache.org/2.x/docs/html-form-buttons-howto.html, to determine
in my validate() method of my action to check wich button was pressed, It
doesn't seem to work though.
private boolean selecaoOk = false;
public void setSelecaoOk(boolean selecaoOk) {
this.selecaoOk = selecaoOk;
}
And in my jsp:
<s:submit value="Próximo" name="selecaoOk"/>
But when the form is submitted the selecaoOk variable is false.
Has anyone succeed in determing wich button was pressed with Struts2.0.9?
Any tips?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]