Creating an EGL field and associating it with a Faces JSP

To create an EGL primitive field and associate it with a Faces JSP, do as follows:

  1. Open a Faces JSP file in the Page Designer. To open a JSP file, double-click on the JSP file in the Project Explorer. The JSP 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.
    .
  2. From the Window menu, select Show View > Other >Basic > Palette.
  3. In the Palette view, click the EGL drawer to display the EGL data object types.
  4. Drag New Field from the palette to the JSP. The Create a New EGL Data Field dialog is displayed.
  5. Type a field name in the Name field.
  6. Select the field type from the Type drop-down list and, if you need to specify the field's primitive characteristics (length and possibly decimals), type the information in the Dimensions text box. Default masks are used if you declare items of the following types:
    • Date (mask yyyymmdd)
    • Time (mask hhmmss)
    • Timestamp (mask yyyymmddhhmmss)

    If you wish to specify a DataItem part as the type, select DataItem, which is the last value in the list. In this case, the Select a DataItem part dialog is displayed, and you either select a DataItem part from the list or type the name, then click OK.

  7. If you are creating an array of data items, select the Array check box and type an integer in the Size text box.
  8. If you do not want to include the field on the page, clear the check box named Add controls to display the EGL element on the Web page and click OK. The field 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.
  9. If you want to include the fields in the JSP file, follow these additional steps:
  10. Select the check box named Add controls to display the EGL element on the Web page and click OK. The Insert Control window opens.
  11. 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.

  12. To change the field label, select the label that is displayed next to the field name, then type the new content.
  13. To select a control type different from the one identified, select a type from the Control Type list.
  14. If you click Options, the Options dialog is displayed, and the specific options that are available depend on whether you are using the field 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.

  15. Click Finish.

Related reference
Page Designer support for EGL
Primitive types

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.