Binding a JavaServer Faces command component to an EGL PageHandler

To bind a JavaServer Faces command component (button or hypertext link) to an EGL PageHandler 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. Bind the an event handler to the command component using one of these methods:
    • 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.
    • To a create a new event handler that is bound to the component:
      1. Right-click on the component and click Edit Events from the popup menu.
      2. Using the Quick Edit view, enter the EGL code for the event handler. For details on using the Quick Edit view, see Using Quick Edit view for PageHandler code.
      The event handler is visible in the Page Data view and a corresponding function is added to the PageHandler. For details, see PageHandler part in EGL source format.

Related concepts
PageHandler

Related tasks
Creating an EGL pageHandler part
Using the Quick Edit view for PageHandler code

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

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