To bind a JavaServer Faces command component (button or hypertext link)
to an EGL PageHandler function, 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 opens
in the Page Designer. Click the Design tab to access
the Design view.
- From the Window menu, select Show
View > Other >Basic > Palette.
- In the Palette view, click the Faces Components drawer
to display the Faces Components object types.
- 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.
- 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:
- Right-click on the component and click Edit Events from
the popup menu.
- 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.