Binding data to a JSF component
About this task
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 JSF page in the project. Another way to add a data component is to open the Page Data view for a JSF project and then drag data components to the JSF page. Among the data components you can drag to the page:
- JavaBean
- J2C JavaBean
- Faces Managed Bean
- Java Persistence API (JPA)
- Relational record
- Relational record list
- Web Service
- EJB Session Bean
- Other data components and scripting variables.
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 (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.
). Right-click within the Page Data view, click