From a Nexaweb Java application UI file, select Client Code (MCO) and Add new handler on the Select Handler dialog and click Next. The Java Class Settings dialog appears.
1. Complete the Java Class Settings dialog as follows:
|
|
MCO ID: Nexaweb Studio automatically specifies the ID for the Java MCO as javaMCO. Specify a unique ID for this MCO by editing the provided ID or creating your own. Source Folder: Nexaweb Studio stores Java MCOs in the project\src-client directory by default. Package: Optionally, specify a package to contain the class. Name: Nexaweb Studio automatically specifies the file name for a new Java MCO as JavaMCO incremented by 1 for each MCO created for a Nexaweb Java project. Specify a unique file name for this MCO by editing the provided ID or creating your own. Superclass: Nexaweb Studio specifies the com.Nexaweb.client.mco.AbstractMCO class by default. Click Browse and enter the class name in the Choose a type field to select another class. Interfaces: Click Add to specify an interface that this class implements. |
Click Next.
The Managed Client Object Method dialog appears.
2. Complete the Managed Client Object Method dialog as follows:
|
|
Return type: Nexaweb Studio specifies void by default. Method name: Specifies the event type for this handler. Configure the parameters for the request: Optionally, click Add to specify any information required to invoke this method. Click in each of the fields to specify the parameter Type, Name and Default value. To edit or remove a parameter, click on it and click the appropriate button. To change the order of a parameter in the list, click on it and then click up or down. |
Click Next.
A Completed dialog appears, displaying a summary of the MCO you created to handle an event:
3. Click Finish.
Nexaweb Studio adds the MCO file to this project's src-client directory in the Navigator view.
The syntax of this handler appears in the Handler column of the event for which you created it on the Manage Component Events dialog.
The MCO appears in the Outline view, and the event appears in the Outline view under events for the component to which you assign this handler to an event.
Click Close to close the Manage Component Events dialog when you finish adding event handlers.