Firing an event at a specific modelAdded by IBM on August 31, 2010 | Version 1 (Original)
|You can fire an event at a specific model or at a specific target.
You can fire an event at a specific model or at a specific target.
To fire an event at a specific model, use the webAppAccess.getModelInstance() method to retrieve the WebAppAccess object for another model:
- In the source model, create a method or method call that calls the fireEventName or fireTargetedEventName method.
For example, you might create a Method Call builder that calls the fireTargetedEvent1 method, passing an instance of the WebAppAccess object for the target model and two string arguments.
WebAppAccess targetModel =
webAppAccess.getModelInstance("TargetModel", null, true);
You can also call the fireEventName or fireTargetedEventName method directly in a method as shown below:
fireTargetedEvent1(webAppAccess, targetModel, "This is foo.","This
- Execute the method or method call that fires the event as part of another method or by adding it as an action in an Action List builder call.
The following code calls the FireTargetedEvent method call shown above:
About firing events: wpf7
If you have an event declared, you can fire that event.
Parent topic: Handling events: wpf7