| Author |
Submitted Form values are repeated across
|
Smitesh Shinde
Ranch Hand
Joined: Feb 16, 2008
Posts: 44
|
|
Hello All,
Form values submitted on one of my page are displayed even after navigate back to that page from other pages.I guess the problem is as I have defined managed bean associated with session scope and that's why values are retained in form bean object.Is there anyway to clear the already submitted values?
|
 |
Rajkamal Pillai
Ranch Hand
Joined: Mar 02, 2005
Posts: 434
|
|
Hi,
To my understanding when a Form Bean is instantiated the Struts framework calls the reset() method. That would take care of setting the form elements to default values. Now a request scope would mean the the form beans are created per request and the reset methods should take care of the rest.
A session scope would make things different and am not sure of the exact life-cycle. Worst case you might have to reset the form bean manually? Are you over-riding the reset()?
Cheers,
Raj.
|
 |
Smitesh Shinde
Ranch Hand
Joined: Feb 16, 2008
Posts: 44
|
|
Raj,
I am extremely sorry for misguiding I should have called in managed bean.As I am migrating from struts to JSF I wrongly called it form bean.
|
 |
Rajkamal Pillai
Ranch Hand
Joined: Mar 02, 2005
Posts: 434
|
|
Hi,
I answered seeing the mention of the form bean. Am certainly not the best guy to suggest anything on JSF. Sorry! Hope somebody else helps you out here...
Cheers,
Raj.
|
 |
 |
|
|
subject: Submitted Form values are repeated across
|
|
|