Binding a JavaServer Faces command component to an EGL page handler

To bind a JavaServer Faces command component (button or hypertext link) to an EGL page-handler function, do as follows:

  1. 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 opens in the Page Designer. Click the Design tab to access the Design view.

  2. From the Window menu, select Show View > Other >Basic > Palette.

  3. In the Palette view, click the Faces Components drawer to display the Faces Components object types.

  4. Drag a command component from the palette to the JSP. Command components have the word Command in the label. The component object is placed on the JSP.

  5. To bind the component to an existing event handler, drag the event handler from the Actions node in the Page Data view to the component object on the JSP.

  6. To a create a new event handler that is bound to the component, right-click on the component and select Edit Events.

  7. For details on using the Quick Edit view, see Using Quick Edit view for page-handler code.

  8. Selecting Edit Faces Command Event opens the file containing the page handler in the EGL editor.

  9. The new event handler is visible in the Page Data view and a corresponding function is added to the page handler. Type the specifics of the page-handler function according to EGL syntax. For details, see PageHandler part in EGL source format.

Related concepts
PageHandler part

Related tasks
Creating an EGL pageHandler part
Using the Quick Edit view for page-handler code

Related reference
Page Designer support for EGL
PageHandler part in EGL source format