Shale is
"a proposal for a modern web application framework, fundamentaly
based on JavaServer Faces". The Shale Framework includes a Dialog
Manager, to describe "conversations" or "dialogs"
(involving multiple views) with the user. Such a dialog is described
using a state-machine like declarative notation defined by the Shale
Framework. An alternative is using SCXML to describe the Shale dialogs
by introducing a DialogNavigationHandler
that uses the
Commons SCXML engine.
There are two war files below, the first one uses SCXML documents to describe the Shale dialogs, and the second one is the Shale source distro as-is, built locally (use cases of interest are the log on / create profile dialogs).
dialog-config.xml
in WEB-INF/
, since
SCXML documents are used to describe the Shale dialogs instead)For the proof of concept, we delegate the SCXML documents based
Shale Dialog Management to a
"SCXMLDialogNavigationHandler
", instead of
the DialogNavigationHandler
in shale-core
.
Some of the Javadoc is reproduced here:
Recipe for using SCXML documents to drive Shale dialogs:
SCXMLDialogNavigationHandler
(available
below, use a Commons SCXML nightly build 10/09/05 or later) and make it
available to your web application classpath (WEB-INF/classes
).
WEB-INF/faces-config.xml
"
for your web application such that the
"faces-config/application/navigation-handler
"
entry points to
"org.apache.commons.scxml.usecases.SCXMLDialogNavigationHandler
"
(with the appropriate package name, if you changed it).
WEB-INF/lib
directory which contains the
SCXMLDialogNavigationHandler
and a
META-INF/faces-config.xml
with just the entry in (2).handleNavigation()
is called with a logical outcome
of the form "dialog:xxx
" and there is no current
dialog in progress, where "xxx
" is the URL pointing
to the SCXML document.Using SCXML documents to define the Shale dialog "flows":
<onentry>
(and may be chained similarly)."faces.outcome"
event which the relevant SCXML
transitions from a "view state" can wait for.Relevant artifacts: