To start, create a new managed bean in JSF configuration file editor, in the Tree view.
When you define a new managed bean, make sure that Generate Source Code is checked as shown in the figure below.
After the "Java" class has been generated you can open it for additional editing. There are two ways to open the "Java" class:
click on Managed-Bean-Class link in the editor
or
right click the managed bean and select Open Source
The generated Java source:
You can also generate source code for properties, also includes "getter" and "setter" methods. Right click on the bean and select New > Property . You will see Add Property dialog.
When the form is open make sure that all the check boxes are selected:
Once the generation is complete, you can open the file and see the added property with "getter" and "setter" methods:
Thus, we've discussed everything which comes to creating a new Managed Bean. Further we will show you how to add an existing Bean into a JSF configuration file.