You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ne...@srb-intl.com on 2003/04/15 14:34:09 UTC

why reset() is called after validate() fails?

Hi,

I am expecting strange behaviour of controller: each time form is submited
and validate() fails, reset() is called. Here comes stack raised from reset():

 at framework.emp.TimesheetReportForm.reset(TimesheetReportForm.java:125)
 at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:811)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)

Can anyone explain why this is happening?

~nn

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


Re: why reset() is called after validate() fails?

Posted by Nicolas De Loof <ni...@cgey.com>.
reset() is called on population (processPopulate), before setting properties to request parameters values.

after that, processValidate() calls validate() (if configured).

So reset() is called each time the form is submited (validate fails or not)

Nico.



Hi,

I am expecting strange behaviour of controller: each time form is submited
and validate() fails, reset() is called. Here comes stack raised from reset():

 at framework.emp.TimesheetReportForm.reset(TimesheetReportForm.java:125)
 at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:811)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)

Can anyone explain why this is happening?

~nn

---------------------------------------------------------------------
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