Select an Existing Handler

After selecting the Create a new event handler or select an existing one from the Configure Event Handler dialog, the Select Handler dialog appears.

image\img00079.gif

Figure 49: Select Handler dialog with Existing Handler

Click on any of the handler types in the Select existing handler list to view the existing resources of that type.

Click on the handler to use in the Handlers list and click Next.

See the following sections on using the various types of existing handlers for the component event selected on the Manage Component Events dialog.

Existing Java Client Code

On the Select Handler dialog, select Client Code (MCO) from the Select Handler list box and any existing Java MCOs appear in the Handler list box. Select an existing Java MCO from the Handler list box and click Next. The Manage Client Object Method dialog appears.

1. Complete the Manage Client Object Method dialog as follows:

image\img00080.gif

Figure 50: Existing Java Event Handler

MCO ID: Specify an ID for the selected MCO. If this MCO already has an ID, you cannot edit this field.

Method name: Specifies the event type to which to add a handler.

Configure the parameters for the request: Optionally, specify values for parameters, if any.

 Click Next.
A Completed dialog appears, displaying a summary of this MCO.

2. Click Finish.

 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 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.

Existing JavaScript Client Code

On the Select Handler dialog, select Client Code (MCO) from the Select Handler list box and any existing JavaScript MCOs appear in the Handler list box. Select an existing JavaScript MCO from the Handler list box and click Next. The Manage Client Object Method dialog appears.

1. Complete the Manage Client Object Method dialog as follows:

image\img00081.gif

Figure 51: Existing JavaScript MCO Handler

MCO ID: Specify an ID for the selected MCO. If this MCO already has an ID, you cannot edit this field.

Function name: Specifies the event type to which to add this handler.

Configure the parameters for the request: Add or remove parameters for this event handler. Click Add to create a new entry in the name\value list. Click on an entry in the list and click Remove to delete it. To change the order of parameters, click on a parameter in the list and then click Up or Down.

 Click Next.
A
Completed dialog appears, displaying a summary of this MCO.

2. Click Finish.

 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 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.

Existing Macro

On the Select Handler dialog, select Macro from the Select Handler list box and any existing Macros appear in the Handler list box. Select an existing Macro from the Handler list box and click Next. The Configure Macro Parameters dialog appears.

1. Complete the Configure Macro Parameters dialog as follows:

image\img00082.gif

Figure 52: Existing JavaScript MCO Handler

Element: Specify the XModify statement type.

Attribute: Specifies XModify select statement.

Value: Specify an expression as a value for an existing attribute. For example specify a string; or ID.attribute, or this.attribute expressions, and so forth.

 Click Next.
A
Completed dialog appears, displaying a summary of this Macro.

2. Click Finish.

 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 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.

Existing Servlet

On the Select Handler dialog, select Project Servlet from the Select Handler list box and any existing servlets appear in the Handler list box. Select an existing servlet from the Handler list box and click Next. The Servlet Methods dialog appears.

1. Complete the Servlet Methods dialog as follows:

image\img00083.gif

Add: Click Add and a new entry appears in the Configure the parameter for the request list box. Click in the entry to specify a parameter name and value.

Edit: Click in an existing parameter in the Configure the parameter for the request list box and click Edit to change the parameter name and/or value.

Remove: Click in an existing parameter in the Configure the parameter for the request list box and click Remove to delete it.

Up\Down: Click in an existing parameter in the Configure the parameter for the request list box and then click Up or Down to re-order that parameter in the list.

 Click Next.
A
Completed dialog appears, displaying a summary of this Macro.

2. Click Finish.

 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 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.

Select a Servlet listed in the Project Event Objects tree. This adds the Servlet URL to the Event Handler textbox.

Modify the URL by entering request parameters needed for the Servlet. The Nexaweb Client will send information to the server about the event using the HttpServletRequest.getParameter function. For more information on the parameters sent to the server for each event, see the Nexaweb Reference Guide.