Generated Event Code Example Overview

Figure 25 shows an example of the code that the Nexaweb Event wizard generates for an MCO.

Line 1: Creates a ClientSession variable and sets its value to the ClientSession associated with the MCO.

Line 2: Creates a ClientEvent variable that gets its value from the getClientEvent() method of the EventHandler associated with the ClientSession.

Line 3: Creates String variables. The first one represents the ID of the Button that was pressed. This variables gets its value from the getParameter() function by passing in the argument id. By checking the ID of the component, it is possible to handle events from multiple components in the same method.

image\img00042.gif

Figure 25: Event Code generated by wizard.