To associate an EGL record with a Faces JSP, do as follows:
- Open a Faces JSP file in the Page Designer. If you do not have a JSP file
open, double-click on the JSP file in the Project Explorer. The JSP file opens
in the Page Designer. Click the Design tab to access
the Design view.
Note: You can access the related PageHandler by right clicking
in the Design view (or Source view) and clicking Edit Page Code.
- From the Window menu, select Show
View > Other >Basic > Palette.
- In the Palette view, click the EGL drawer to
display the EGL data object types.
- Drag Record from the palette to the JSP page.
The Select a Record Part dialog is displayed.
- Select a record from the list.
- Specify the field name or accept the default value, which is the record-part
name.
- If you are declaring an array of records, select the Array check
box and type an integer in the Size text box.
- If you do not want to include the record on the page, clear the check
box named Add controls to display the EGL element on the Web page and
click OK. The record is now available in the Page
Data view. You can add it to the JSP file later by dragging it from the Page
Data view to the JSP.
- If you want to include the fields in the JSP file, follow these additional
steps:
- Select the check box for Add controls to display the EGL element
on the Web page and click OK. The
Insert Control window opens.
- In the Insert Control window, select the radio button that
indicates your intended use of the field:
- For output (Displaying an existing record)
- For input or output (Updating an existing record)
- For input (Creating a new record)
Your choice affects the types of controls that are available.
- To change the order of fields, use the up and down arrows.
- If you wish to select only a subset of the listed fields, click None and
select the fields of interest. To select all fields instead, click All.
- Do as follows for each field:
- To exclude a field, clear the related check box. To include the field,
ensure that the check box is selected.
- To change the field label, select the label that is displayed next to
the field name, then type the new content.
- To select a control type different from the one identified (if possible),
select from a list of types.
- If you click Options, the Options dialog is
displayed, and the specific options that are available depend on whether you
are using fields for input, for output, or for both. One option in any case
is to include or exclude the JSF tag <h:outputLabel> around field labels.
When
you complete your work in the Options dialog, click OK.
- Click Finish.