Use the Event wizard to connect an application's business logic to a user interface component's event handler.
You can either connect a component to existing application business logic, for example a previously created MCO, or create a new MCO or other type of business logic to which to connect this component.. For example, in the case of a button click that calls a MCO to validate a form:
You can use the event wizard to:
Create a MCO (or other event handler) with a method\function that the Nexaweb Client can call
Connect the button event to the MCO method
Or
Connect a button event to an existing MCO (or other event handler)
To manage component events, follow these steps:
1. To access the Manage Events wizard either:
Right-click on the component's tree node in the Outline view and select Manage Events.
Right-click on the component in the Visual Editor and select Manage Events.
Select the component and click
, the Event wizard icon in the toolbar.
Note: To make the Event wizard icon available on the Nexaweb Studio toolbar, you must add the Nexaweb Advanced Formatting tools. See Nexaweb Studio Toolbars.
The Manage Component Events dialog appears.
(Any event handlers already specified for events for this component appear in the Handler column of this dialog.)
2. Complete the Manage Component Events dialog as follows:
|
Figure 32: Manage Component Events dialog |
Component Description Filename: Specifies the name of the file that contains the selected component. Component: Specifies the text of the selected component and the component type in parenthesis. Configure handlers Event: Click on the type of event to configure for this component. Handler: Add, Edit, or Remove a handler for the selected event type.
|
3. To add or edit an event handler, click Add or Edit and complete the Configure Event Handler dialog as follows:
|
Figure 33: Configure Event Handler dialog |
Component: Displays the text of the selected component and the component type in parenthesis. Event: Displays the selected event type for which you add a handler. Configure an event handler Click the radio button beside one of the event handler options.
Create New Handler: Displays the Create a New Handler page from which you select the type of resource (MCO, Macro, JavaServer Page, Project Servlet, or XModify file) to create as the event handler for the selected component-event. Select Existing Handler: Displays a list of existing resources that you can use as an event handler for this component-event. Specify Handler: Specify the appropriate syntax to associate an event handler with this component-event. Use File for Handler: Specify or browse for a file to use as the event handler for this component-event. |