Working with data in Faces applications
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 drawer in the Palette view. Open the Data 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:
- Relational record: Create and use data from a database record.
- Relational record list: Create and use data from multiple database records.
- JavaBean: Add a new JavaBean or use an existing JavaBean on this page.
- Web Service: Insert a Web service onto this page.
- Other data components, such as EJB Session beans.
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 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
Faces components
Data access for Faces components
Data table components
Related tasks
Adding a relational record to a Faces JSP file
Adding a relational record list to a Faces JSP file
Adding a JavaBean to a Faces JSP file
Creating a Web service
Related reference
Faces components reference
Faces attributes reference