15,000 Jobs Available in:
Java, ASP, C#, PHP, SQL, SAP, MySQL and many more.
- Class Quick -
The moose likes JSF and the fly likes Submitted Form values are repeated across Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Submitted Form values are repeated across" Watch "Submitted Form values are repeated across" New topic
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?

This message was edited 1 time. Last update was at by Smitesh Shinde

Raj Kamal
Ranch Hand

Joined: Mar 02, 2005
Posts: 392
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.
Raj Kamal
Ranch Hand

Joined: Mar 02, 2005
Posts: 392
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
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com