You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Maris Orbidans <M....@datapro.lv> on 2002/03/25 16:21:20 UTC

when does STRUTS call reset() on form beans ?

Does it depend on scope of a session bean ?

thanx in advance
Maris Orbidans

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: when does STRUTS call reset() on form beans ?

Posted by Ted Husted <hu...@apache.org>.
In 1.0, reset is called just before the servlet autopopulates the bean
from the request. In 1.1 beta, it is also called when an html:form tag
instantiates the bean (not finding one in the request). 

If an Action forwards to another action-mapping, reset is called again
since the controller will autopopulate the Action form for the next
action. (It doesn't actually know that the request was forwarded.) If
that's a problem, you can use a mutable property on your form-bean to
tell the mutators not to accept new data. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Maris Orbidans wrote:
> 
> Does it depend on scope of a session bean ?
> 
> thanx in advance
> Maris Orbidans
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>