Java Reference
In-Depth Information
In the dataTable, each Employee field will be displayed in an outputText field (indicated by the field name in
braces). RAD has “bound” each column's outputText field to a field in the RRL. For example, selecting any of the
outputText fields and switching to the Properties view will show that the value property of the outputText field
contains an EL statement identifying the RRL data field. This means that the outputText field will display the value(s)
from table for that field/column. We will explore the implications of binding a visual component to a data object in
more detail later in this chapter.
14.
Run AllEmps on the server.
The results should look like Figure 12-13 . Notice that the name of the page in the address window is AllEmp. faces
not AllEmp. xhtml . This will be important later when we want to navigate between the pages.
Figure 12-13.
Accessing and formatting data from a database using an SDO is surprisingly easy. The programmer does not have
to worry about connections, page context objects, SQL statements, and so on. However, SDO objects are more limited
than coding a JSP from scratch. For example, in a RRL the data is only displayed in an output text field. A programmer
could modify the JSP/SDO code to change this or add code so that another visual component uses the RRL fields.
However, this is not to be taken lightly. A thorough understanding of how the JSF and SDO components work is
needed to accomplish this. We will show more of the SDO capabilities and demonstrate the complexity involved in
changing and working with them.
Tutorial: Formatting a Facelet
All of the text and visual components in a Facelet can be moved, sized, and formatted just like all the other visual
components we have used so far. In other words, you can use the Properties view or click and drag in the Page
Designer view to manipulate the formatting property values. However, the Facelets Properties view has a slightly
different look and feel.
1.
In the Page Designer view, click on the {PAYRATE} field in the Payrate column, as seen in
Figure 12-14 .
 
Search WWH ::




Custom Search