Web Application Development: Configuring JSF Projects This document describes the following:
1. Configuring Projects for JSF OEPE provides a JSF project facet with the following functionality that you can use to configure your JSF projects:
You add JSF capabilities to your Web project with Oracle Weblogic Server runtime support as follows:
1.1 Supported JSF Libraries and Versions OEPE provides support for JSF 1.2 and 1.1 versions.The following table maps the supported JSF versions to three types of libraries:
2. Creating and Configuring the Faces Configuration Resource File OEPE provides support for Faces configuration resource file by allowing you to create and edit this file.2.1 Creating a Faces Configuration File You can create a new Faces configuration file for your JSF dynamic Web project as follows:
Faces Configuration directory and select New JSF Configuration File from the drop-down menu, as Figure 10 shows. 2.2 Using the Faces Configuration Node Using your JSF dynamic Web project's Faces Configuration node that Figure 11 shows, you can create the following: 2.2.1 Creating a New Managed Bean You create a managed bean in your Web application to bind the bean properties and business logic to the user interface components as follows:
2.2.2 Creating a New Navigation Case You create navigation rules to link Web pages. Each navigation rule can contain one or more navigation cases. To define navigation rules and cases, follow this procedure:
2.2.3 Creating a New Converter You can create a converter for your Web application. A converter is used in the conversion model, where each component can be associated with the server-side model object data. The component data can have two views: model and presentation. You can enable conversion of the data between the model view and the presentation view. To create a converter, proceed as follows:
javax.faces.convert.Converter . 2.2.4 Creating a New Validator You create a validator for your JSF project as follows:
javax.faces.validator.Validator .2.3 Using the Faces Configuration Editor The Faces configuration editor allows you to modify thefaces-config.xml file to define and edit page navigations, managed beans, components, converters, validators, render-kit, as well as to perform other element configurations.
You use the editor as follows:
3. Understanding JSF Resouce Bundles If you would like your JSF application to use a resource bundle, you need to register it with the application. For JSF projects, when they are configured with the JSF facet, anapplication.properties file is automatically created in the src/resources folder. As one of the uses of a resource bundle is to enable localization, a loadBundle tag is typically added to each JSP page you want to localize:
|