Reset only resets back to the default values (it renders as an HTML submit)
Since struts puts the values into the html fields (value="blah") that is
picked up as the default values.
Therefore, reset will reset back to what the screen looked like when you
first came in before doing any posts.
-Tim

-----Original Message-----
From: Kommana, Sridhar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 11:52 AM
To: Struts Users Mailing List
Subject: problem with reset button in DynaActionForm


   Iam using Struts 1.1 beta 2 version.
   I have one zipcode search page.it has search criteria fields and search
results table.

case:1
   If i enter search criteria and click on reset button it works fine.

case:2
   If i enter search criteria and click on search -- iam calling action
where iam type casting as like:     
ZipForm form = (ZipForm) frm;
once search is performed.now if i click on reset button the search criteria
values are not resetting to null.
   

ActionForm looks like:
public class ZipForm extends org.apache.struts.action.DynaActionForm {
    private String searchZipCodeCity;

    public void reset(ActionMapping mapping, HttpServletRequest request) {

        searchZipCodeCity = null;
    }
}

struts-config looks like:
<form-bean name="zipform" type="com.test.ZipForm">
      <form-property name="searchZipCodeCity" type="java.lang.String" />
</form-bean>

Where iam doing wrong?

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]

Reply via email to