Initializing a Managed Bean in the Faces Configuration File

If a managed bean property is a complex type, you must declare the property as a managed property in the faces-config.xml file to have the managed bean initialize at runtime.

To initialize a managed bean in the Faces Configuration file:

  1. In the WorkSpace Navigator, expand the project that contains the managed bean that you want to initialize, expand webroot, then expand WEB-INF.

  2. Double-click faces-config.xml.

    The JSF Application Configuration Editor opens.

  3. Select the ManagedBean tab.

    The Managed Bean page appears.

  4. Select the managed bean that you want to initialize in the Managed Bean Elements section.

  5. In the Initialization section, click Add.

    The Edit Managed Bean Properties dialog box appears.

  6. Click the arrow in the Property name field and select the name from the drop-down list.

    The Property Class field is populated with the class associated with the selected property.

  7. Click the arrow in the Value type field and select the value from the drop-down list.

  8. Select a value and click OK.

Initializing a Managed Bean in the Java Source Code

Creating a Java Managed Bean

Creating an EJB Managed Bean

Creating a Service Managed Bean

Creating a DataWindow Managed Bean

WorkSpace Navigator

JSF Application Configuration Editor

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com