struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: "action" attribute in reset button
Date Mon, 09 May 2011 12:21:07 GMT
You can try this
<s:reset name="Reset" method="TLDTests.5.5.2.Reset_resetCase2"/>


-----Original Message-----
From: Baubak Gandomi [] 
Sent: Monday, May 09, 2011 5:46 PM
Subject: "action" attribute in reset button

Hi All,


I'm currently fiddling with <s:reset and have discovered that just like
the taglib "<s:submit" it also contains the attributes "method" and


Testing it, they do not seem to have any effect:


Here is my Action :

<action name="startResetTest"







<action name="TLDTests.5.5.2.Reset"




In my class I have:

public class ResetClass {

      private String modelSignal;


public String fillList() {

            setModelSignal("Passed through fillList");

            return "startReset";



public String resetCase2() {

            setModelSignal("Passed through Submit Test #2");

            return ActionSupport.SUCCESS;



      public void setModelSignal(String usedModel) {

            this.modelSignal = usedModel;


      public String getModelSignal() {

            return modelSignal;




In my view I have :

<s:property value="modelSignal"/>

<h2>Reset Case 2</h2>

We specify the action and method through the reset button :


      <s:textfield label="test 2 : " name="resetTest2Field"/>

      <s:reset action="TLDTests.5.5.2.Reset" method="resetCase2"/>



My assumption is that if I press "rest" here I should be send to the
action "TLDTests.5.5.2.Reset" and the method "resetCase2" in the class


But when I press "reset", it just empties the field values of my form
and nothing else. I keep the context  I even tested this in debug mode.
When I press "Reset" I do not enter the action class. 


Does anyone know when the "action" attribute of "<s:reset" is used?


Best regards,



Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are
intended for the exclusive use of the addressee(s) and may contain proprietary, confidential
or privileged information. If you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and destroy all copies
of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email
and any attachments for the presence of viruses. The company accepts no liability for any
damage caused by any virus transmitted by this email.

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

View raw message