Navigation Controller

User interfaces in many business environments require numerous views that may be difficult to coordinate. The Navigation Controller component addresses navigation between views by using an event-based mechanism that has the following advantages:

As part of this mechanism, the toolkit provides the following types:

The desktop package implements an interface for the Navigation Controller. This interface will store information about the view, such as the navigation area, the navigation type, and the next view to navigate.

The desktop package also provides a class, DSENavigationController, that implements the NavigationController interface. This class is able to handle events (DSECoordinationEvents) signaled by the panels (DSECoordinatedPanels) and dispatch them. Examples of these events are PreviousView, NextView, Undo, Cancel, and ViewClosed.

When a DSECoordinationEvent is fired, it can be handled by some entities. The system delegates some responsibilities to the view, to the controller, and possibly to the flow processor if a process has been defined. Each of these manages some events and propagates others. You can define a level for each DSECoordinationEvent. This level determines which entity handles the event.

The first entity responsible for managing events is the panel, which manages all the "Coordination" events. All other events are propagated to the Navigation Controller.  The Navigation Controller is registered as a listener of events signaled by the views. It handles the "Navigation" events and performs some defined actions. The action events are propagated to the flow processor. 

The flow processor handles the action events propagated by the controller. 

The following diagram shows the relationship among these components:

Diagram showing relationship between events, flow processor, navigation controller, and views

All the information about the navigation is sent with the event fired. This information is configured by the developer when the different views are being defined.

With this behavior, an object of the DSENavigationController class will receive a DSECoordinationEvent, and will then look at the view registry to get the event information and update the content of the registry with the values of the event. If the contents of the event indicate that a new view must be shown, the Navigation Controller will clear the current view of its navigation area (the area where the views are shown) and will add the new view to the navigation area frame. If a new task or process is opened, a new frame (new navigation area) will be opened, and different business functions running will be shown.

The Navigation Controller not only handles DSECoordinationEvents, but can also fire events. DSENavigationController is able to create two types of events: toolkit events and DSECoordinationEvents. Toolkit events are signaled and handled by the toolkit flow processor, and will be events such as OperationReplied,or ViewOpened. DSECoordinationEvents will be fired and handled by their task classes.

Note that while the Navigation Controller is normally event-driven, you can also use it directly by calling its API. The flow processor, for example, does this. 

See Using the Navigation Controller.