struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: problem with reset button in DynaActionForm
Date Wed, 04 Jun 2003 15:59:42 GMT
I never use the Reset button myself, but afaik its just an html reset button
(the clicking of which resets form properties to the values they started
with when the browser loaded the page (doesnt cause a hit on the server))
and thus has no relation with the actionforms reset() method.

-----Original Message-----
From: Kommana, Sridhar [mailto:Kommana.Sridhar@principal.com]
Sent: Wednesday, 4 June 2003 23:52
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message