Strategy ONE
Adding an Event Handler to a Bean
Adding an event handler to a bean creates a new event handler to be associated with a specific bean instance on a specific page. This topic provides step-by-step instructions on adding an event handler to the instance of a bean on a MicroStrategy Web page.
-
Launch the Custom Event Handler Creation Wizard.
-
Select a source folder for the MicroStrategy project by clicking Browse next to the Source folder text box.
-
Select a package by clicking Browse next to the Package text box.
-
Enter a name for the event handler in the Name text box.
-
To create a new event, select the radio button Create New Event and specify an ID and name for the new event in the Event ID and Event Name text boxes respectively.
To use an existing event, select the radio button Use Existing Event and select the appropriate ID from the drop-down menu for Event ID.
-
Click Add to specify arguments for the event.
-
Click the Click here... text in the Argument ID column to enter the argument ID.
-
If the argument is a required argument, select the check box next to the argument ID in the Required? column.
-
Click the Click here... text in the Argument Name column to enter the name for the argument.
-
Click Next.
-
Click Finish. Two files open in the Web Customization Explorer. One file contains code for the event handler, and the other contains code for the enumeration.
The new event handler gets added to the bean. It is listed in the Event Handler text field for the bean under the Propertiessection.
-
Modify the code for the event handler and enumeration as appropriate.
-
Save your changes.
After you have completed this task, you must restart the application server for changes to take effect, unless the reloadConfigurationFiles property in microstrategy.xml is set to true. See Applying Customization Changes for information on changing the value of the reloadConfigurationFiles property.
