This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSF and the fly likes Clearing JSF Text filed values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSF
Bookmark "Clearing JSF Text filed values" Watch "Clearing JSF Text filed values" New topic

Clearing JSF Text filed values

ranjith moram

Joined: Sep 15, 2012
Posts: 17
Hi All,

I have just started learning(2.x), I started developing login page.
when I enter value and submit the form, these values are saved and even I refresh it getting same value(Values Not being cleared).

How can I clear these values.

I googled for the same but I am unable to make it.

Awaiting for your answer.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17018

NOTE: "login pages" may be fine for training purposes, but for real-world web applications, please use the J2EE built-in login system. User-designed security systems are almost universally insecure.

When a page is displayed in JSF, the control values displayed will be whatever values were in the backing bean (Model) associated with that page (View definition). To clear the display, clear the backing bean values. Do not attempt to directly manipulate the UI itself.

Customer surveys are for companies who didn't pay proper attention to begin with.
Balaji Manoharan Bm

Joined: Sep 22, 2013
Posts: 13
Think your bean is in session scope.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Clearing JSF Text filed values
It's not a secret anymore!