• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Clearing JSF Text filed values

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Think your bean is in session scope.
 
reply
    Bookmark Topic Watch Topic
  • New Topic