You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Abhinav (Cognizant)" <Ab...@cal.cognizant.com> on 2003/05/15 11:21:44 UTC
Clear my Confusion......Form Beans .????!!!!!
I type a url in browser address bar to invoke a JSP.
1. The form action of this page is mapped to a bean. This bean is created before the page is loaded in the browser.
2. This page is submitted to another action.
3. That action is also mapped to a bean.
4. When submitted(step 2), bean of step 1 is created once again.
5. reset of this bean is called.
6. bean of step 3 is created.
Scope of all beans are specified as 'request'.
I have put log statements in Bean Constructors and reset methods.
I want to know why is the reset method called even though a new bean is being created.
Thanx,
Abhinav
Re: Clear my Confusion......Form Beans .????!!!!!
Posted by Nagendra Kumar O V S <na...@ikigo.com>.
HI,
struts will call the reset , irrespective of being created a new bean or
reusing it. it gives a chance to initialize the variables
probably , struts developers feel this the right place always to
initialize/reinitialize
nagi
-------Original Message-------
From: Struts Users Mailing List
Date: Thursday, May 15, 2003 02:49:01 PM
To: Struts Users Mailing List
Subject: Clear my Confusion......Form Beans .????!!!!!
I type a url in browser address bar to invoke a JSP.
1. The form action of this page is mapped to a bean. This bean is created
before the page is loaded in the browser.
2. This page is submitted to another action.
3. That action is also mapped to a bean.
4. When submitted(step 2), bean of step 1 is created once again.
5. reset of this bean is called.
6. bean of step 3 is created.
Scope of all beans are specified as 'request'.
I have put log statements in Bean Constructors and reset methods.
I want to know why is the reset method called even though a new bean is
being created.
Thanx,
Abhinav