Binding data to a JSF component

When you are creating a Faces application, you can choose from among several kinds of data sources, such as relational record lists or JavaBeans™. Once you choose a data source, you then have several ways to create the data in the Faces JSP file.

One way to add a data component is to use the Data and Services drawer in the Palette view. Open the Data and Services drawer and then you can drag a data component to a Faces JSP file in the project. Another way to add a data component is to open the Page Data view for a Faces project and then drag data components to the Faces JSP file. Among the data components you can drag to the page:

Once you drop the data component on the page, a wizard opens for defining the data source and optionally adding related data components on the page.

If the Data and Services drawer is not visible on the palette, right-click within the palette and select

Customize. Then click

Data and clear

Hide.

Note that you can also add these components from the Page Data view (

Window | Show View | Page Data). Right-click within the Page Data view, click

New, and select the data component you want to add. Once you have defined data sources for your project, they are listed in the Page Data view. Note that creating the data source from the Page Data view does not give you the option of adding related data components to the page. To do that, drag the created data source from the Page Data View to the page.

 

Related concepts

Data table components