Salesforce

How Do I Handle the Same Event Using Several Handlers? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Handle the Same Event Using Several Handlers? (Magic xpa 4.x)

An event that is raised in Magic xpa can propagate “up.” If an event is raised in a child task, it can be handled in that task, and all the ancestor tasks, including the Main Program.

Allowing an event to propagate

You can control whether or not the event stops at a given handler or not, by setting the properties of all the logic units in the event tree.

  1. Set the Propagate property to Yes (or write an expression that evaluates to ‘TRUE’LOG when you want it to propagate).

  2. For any task involved that is not the lowest-level one, set the Scope property to Subtree.

Now the event will be handled at one level and passed up to the next.

This works for all user events. For internal events, you may have to re-raise the event. For instance, if an Exit event is raised in the grandchild, it will be “used up” when the grandchild task exits. So if you want the next task up to also handle the Exit event, you would have to raise another Exit event in the grandchild task. (Subforms, however, would be a better choice in that case).

See also

The Online and Rich Client Samples projects (program EH03 and REH03)

Reference
Attachment 
Attachment