Adding Faces Managed Beans to a Web page

To work with dynamic data on your Web page, you need to define a data source, such as a JavaBean. The JavaBeans™ you create can be used on a single Faces JSP, or, you can create Faces Managed Beans that you can reuse on any Faces JSP in your project. Once you create a Faces Managed Bean, you can easily drag it from the Page Data view to reuse on other Faces JSPs. All Faces Managed Beans for all Faces JSPs in a Web project display in the Page Data view and can be shared among the pages in the project.

  1. Create a JSF enabled dynamic Web project.

  2. Create a JSF page.

  3. Create a Faces managed bean.

To add a Faces managed bean to a Web page:

  1. In the Page Data view, expand

    Faces Managed Beans.

  2. Drag your Faces managed bean onto your Web page. The Insert JavaBean wizard opens.

  3. Follow the instructions in the wizard to generate a user interface on your Web page that is bound to your Faces Managed Bean.