Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clearing input text fields (Primefaces)

 
Tram mart
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a menu with 2 options, one of them is "Create new user".
When I press on "Create new user" there is a form, and a "Next" button. When pressing "Next" I go to another form, and finally I click on "Save" and all the data is saved.
The problem is that after saving all the data, if I press again in "Create new user", all the fields still have the last data that I wrote, instead of being blank.
How could I fix this? Thanks
 
Clemens Brunnow
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe just set the scope of the bean, where the data is stored to RequestScoped or just set all values to null after saving the user
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic