The Web site in this tutorial uses dynamic Web pages with JavaServer Faces components to access a database and display information on the page. This tutorial uses relational records and relational record lists to represent the data in a database so the data can be displayed on the page in the form of a data table or an ordinary HTML table. Java™ access beans are used by these components.
Data access beans are Java bean representations of enterprise beans. They are typically used in client programs that employ JavaServer Pages (JSP) files, servlets, or enterprise beans that interface with other enterprise beans. Access beans shield you from the complexities of managing enterprise bean life cycles. This means that you can program to enterprise beans as easily as you can program to Java beans, which simplifies your enterprise bean client programs and reduces your overall development time.
JavaServer Faces is a technology that helps you build user interfaces for dynamic Web applications that run on a server. The JavaServer Faces framework manages UI state across server requests and offers a simple model for the development of server-side events that are activated by the client. JavaServer Faces is based on a model-view-controller (MVC) framework. For JavaServer Faces, this means that the controller is a servlet, the model is represented by JavaBeans™, and the view is comprised of JavaServer Faces components with little or no application code. The goal of this model is to separate content from presentation. Tools such as Faces Components to help you use this technology in your Web applications. Faces Components include a JavaServer Page (JSP) custom tag library for expressing a JavaServer Faces interface within a page. This wizard helps you create JSP files that are enabled to use the Faces components. Faces components let you develop a Web application by dragging components from a Faces drawer in the Palette view and dropping them on the Web pages you are creating. For example, you can drag an input text field and drop it to a form on the page. Then you can drag and drop a Submit button next to the input text field. Finally, you can connect the input text field to your data source. This will enable end users to enter data from the Web application to your data source. Another benefit of applications built using Faces components is that the user interface is rendered independently of the underlying program logic. This means that your applications can run and access data on different platforms, such as browsers or handheld devices. |
![]() |
The data table is a component in a Faces JSP page that holds data objects such as a relational record list.Though a data table appears to have rows and columns like an HTML table, it does not work like an HTML table. If you wish to format input and output controls as in a table, you must use a Panel - Group Box from the Enhanced Faces Components drawer in the Palette. This is covered in Exercise 2.2: Formatting a Data Table.
To create a new relational record list: