• Post Reply Bookmark Topic Watch Topic
  • New Topic

A very little jsf bean question  RSS feed

 
Adnan Gondal
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all! I'm inserting data from a jsf page to database using managed beans.
But the problem is when my jsf page is loaded existing beans values are displayed in the form fields, but i want to show form fields empty at the time of loading. Please reply. Thanks in advance.

Following are my code snippets Bean class:


JSF page:-

 
Dieter Quickfend
Bartender
Posts: 543
4
Java Netbeans IDE Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you're binding the form fields to the properties of your object. So if your object has no set properties, the form fields won't show values. So just make sure your object has no set properties.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!