RE: problem with reset button in DynaActionForm
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:[EMAIL PROTECTED] 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: 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]
RE: problem with reset button in DynaActionForm
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: 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]
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: Where iam doing wrong? Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]