First page Back Continue Last page Graphics

Contextual Events Overview


Contextual Events Example

As an example of using the contextual events framework, consider a containing page that contains two regions representing two task flows. The task flows in the separate regions have no knowledge of one another, as if there is a wall between them. Only the containing page has knowledge of both regions, so it is the containing page that must coordinate the interaction between them.

The goal of creating a contextual event in this example is to accomplish the following:

Pass information from the first region to the second region.

React in the second region based on the information that is passed.

When an action, such as a button click, occurs in the first region, the event is initiated. There is a method defined that constructs the payload for the event, that is, the information that is being passed to the other region. There is another method on the target, or consumer region, that specifies how that region should respond. The job of the containing page is to map the event: specify which is the payload method, which is the handler method, and so on.