Open in new window

back

Code Generation for Managed Beans

Exadel Studio gives you lots of power to work with managed beans.

  • Add and generate code for new managed beans
    • Generate code for attributes and getter/setter methods
  • Add existing managed beans to JSF configuration file

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 attributes - this also includes getter and setter methods.

Make sure that all the check boxes are selected -

  • Add Java property
  • Generate Getter
  • Generate Setter

Once the generation is complete, you can open the file and see the added property with getter and setter methods -

back