Use the Nexaweb Event Code Generator wizard to quickly generate a method in a Java MCO or servlet to use as an event handler. These methods contain the code necessary to capture all the parameters supplied by the client for events from Nexaweb components.
To generate an event handler with the Nexaweb Event Code Generator wizard:
1. Right-click on a Java file or servlet in the Navigator view and select Nexaweb > Event Code Generator.
The Event Code Generator wizard appears.
2. Complete the Event Code Generator wizard as follows:
|
Figure 24: Event Code Generator |
Events: Lists all Nexaweb component events by component or container type. Expand a component or container type to see all events for it. Select the Nexaweb component event for which to create code. Method name: The name of the Nexaweb component event that you selected appears here. The settings in this dialog create a method named onMouseDown with the necessary calls to obtain all information about the event. Figure 25 shows the code generated by the Nexaweb Event Code Generator wizard. |
The event code generator wizard adds the method to the selected file.