Customizing data binding for third party JavaServer faces controls in rational application developer
Introduction
The ibm®rational®application Developer version 7.5.5 has extensibility support for the standard Java™server Faces (JSF) tag Library. In addition, the Rational application Developer also supports third-party tag libraries. By using the Faces Library Definition, you can customize the communication between the Rational application Developer and other controls, tailored to your needs. The Faces Library definitions contains a way to specify how specific controls are bound to data. This article demonstrates those features and policies that configure various types of controls. In addition, you will see how the data templates for Rational application Developer are used with the Faces Library definitions and Third-party controls.
There are two main ways to design a Web page that links components to data. You can put artifacts on a page, bind them to data, or you can create data templates that automatically create artifacts for you based on the data you choose. This article discusses both of these ways, and you will see how easy they are, even if used with a Third-party tag library.
You start by creating a network project and a Faces library Definition based on the myfaces Tomahawk tag Library. Next, you will edit the Faces Library Definition and give Rational application Developer more information about these artifacts. You then create a data template based on some sample data and generate a Tomahawk control that is bound to the data. Finally, you add private Tomahawk controls to your network pages and then bind them to our sample data.
In the learning process of this article, you create:
A Faces Library Definition based on Tomahawk
A network project that contains two pages:
A control that contains a build from a data template
A page where controls are placed and then bound to data
Both Web pages display basic information about MyCompany's fictional employees: her name and her position in the company.
Prerequisite conditions
These previous DeveloperWorks articles provide background information. You should read these two articles before you read this article.
Faces Library definition for third party JavaServer Faces controls
Introduction to JavaServer Faces data template
Create
Create a Web page
To start, create a network project. This is a simple project that allows you to test and configure the communication between the Rational application Developer and the Tomahawk control.
Choose File > New > Dynamic Web Project from the menu.
The New Dynamic Web Project Wizard will show up. Select the following options, as shown in Figure 1.
Name the project Mywebproject.
Specify a server as the target.
In the Configuration combo box, select JavaServer Faces v1.2 Project.
Click Finish.
Figure 1. New Dynamic Web Project Wizard