Web Libraries: Dispatchers

About Dispatchers

Dispatchers are a component of the openSEAL MVC Framework, and are responsible for the server side forwarding (dispatching) of a request that has completed its interacted with the "Model", and now needs to move onto returning the approprate "View". Dispatchers implement the IDispatcher interface, and openSEAL has several pre-written implementation that you can choose from. These implementions should serve your needs the majority of the time, but if you require more custom behavior, it is a straightforward task to create and plug-in your own IDispatcher implementation.

openSEAL Implemented Dispatchers

All openSEAL implemented Dispatchers are located in the org.openseal.ui.web.dispatch package. They all extend either directly from the abstract class BaseDispatcher or a child of it.

ConfigDispatcherImpl

ConfigDispatcherImpl extends directly from BaseDispatcher, and is designed to dispatch based on the status of the request, and configuration information declared in the config file.

OriginDestinationDispatcherImpl

The OriginDestinationDispatcherImpl extends from the ConfigDispatcherImpl.

NavDispatcherImpl

The NavDispatcherImpl does not extend from ConfigDispatcherImpl, but instead extends directly from the abstract BaseDispatcher. Its for used for straightforward navigation request, and dispatches based on the status and the extra path of the request. It takes the extra path of the Http Request, and tries to dispatch to that resource. e.g.

  • http://localhost:80/refapp/nav.openseal/home/index.aspx will be dispatched to the aspx file at /refapp/home/index.aspx underneath the web servers root.
  • /refapp/cmd.openseal/refapp/ted/helloworld.asp will be dispatched to /refapp/refapp/ted/helloworld.aspx (note: the Request.ApplicationPath is prepended to the Extra Path, or in other words you do not need to add the virtual directory to your extra path).

If the dispatching work results in an error (such as if the page is missing or won't compile), then the NavDispatcherImpl will call doDispatchError on the DispatcherUtil.

WizardDispatcherImpl

This is currently a work in progress so it is not recommended that you use this yet.

Implementing your own dispatcher

TODO: write up some info on what to do here. For now please post messages to the mailing list and we'll be glad to help