You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Rahul Akolkar <ra...@gmail.com> on 2006/10/27 01:07:09 UTC

Re: scxml dialogs - how to register them, and whats with dialog2stateview.xml

On 10/26/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> If i want to start them i have to use an outcome of dialog:xxx, but how
> to i register my scxml files.
<snip/>

I'm going to write up the barebone documentation for
shale-dialog-scxml over the weekend (and hopefully, the site will be
cranking again by then -- we're also in the midst of an infra move).
Thanks for your patience.

In the meantime, look at the WEB-INF/dialog-config.xml [1] in the
shale-test-dialog-scxml sample app [2] for an example. Thats the
canonical file name we look for, ofcourse that can be changed to some
other of your choice (or a CSL thereof) by using the
"org.apache.shale.dialog.scxml.CONFIGURATION" context initialization
parameter (no need if you use canonical name).

I plan to add a DTD for the dialog-config.xml (SCXML impl) soon,
that's a TODO in code, IIRC.


> And whats with the dialog2stateview.xml, have i have to register it too
> in some context param?
>
<snap/>

Thats from the old documentation page [3], which I pointed you to ;-)
That bit is obsolete.

If you're familiar with the Shale View Controller, then the closest
analogy is the ViewControllerMapper (that thing which maps the view id
to the ViewController managed bean name).

The idea basically is that the state and the activity that is
performed while you are in that state are distinct things. The
activity that you perform causes events to be raised that may cause
the (dialog) state machine to progress.

This is critical in places such as wizards (or "reusable controllers")
where the control flow could be potentially reused or multi-modality
(where the same control flow is basically needed when the business
needs to cater a service to web clients, people calling into the
helpdesk, or using small devices; and alignment across the technology
stacks is highly desired, to the extent that is possible). We have a
relevant example for the latter in the RDC taglib [4].

So the goals become:
a) Decouple the <state> from the view
b) Use a sensible default for those who don't care

The code in Shale trunk has (b), but not (a). It basically takes the
<state> id and uses it as the JSF view id (with minor considerations,
such as adding a leading slash if needed). I expect to have a
DialogStateMapper (or some such name) in there so the default can be
changed to whatever the application developer desires.

All feedback is welcome, once you take things for a spin.

-Rahul

(some long, possibly fragmented URLs below)

[1] http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-dialog-scxml/src/main/webapp/WEB-INF/dialog-config.xml?view=markup
[2] http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-dialog-scxml/
[3] http://jakarta.apache.org/commons/scxml/usecases/scxml-in-shale-dialogs.html
[4] http://jakarta.apache.org/taglibs/doc/rdc-doc/intro.html


> Torsten
>
>

Re: scxml dialogs - how to register them, and whats with dialog2stateview.xml

Posted by Rahul Akolkar <ra...@gmail.com>.
On 10/27/06, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> <snap>
> >
> > > And whats with the dialog2stateview.xml, have i have to register it too
> > > in some context param?
> > >
> > <snap/>
> >
> > Thats from the old documentation page [3], which I pointed you to ;-)
> > That bit is obsolete.
> >
> </snap>
>
> If this is obsolete, is their any way to map a state to a view, or have
> i have to compose my state names according the view names?
> A name "login" which goes to "profile" which i can map to views comes in
> more handy, when the view is named like
> "/path_to_my_view/profile_xyz.jsp".
>
> Have i have to use this view name + path as id or can i still map
> things?
>
<snip/>

Yes, but probably not for too long. As I said in my previous email in
this thread, thats the default convention which exists in SVN ATM (but
the convention will soon -- a week, give and take -- be configurable
;-).

-Rahul


> Torsten
>
>

Re: scxml dialogs - how to register them, and whats with dialog2stateview.xml

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
<snap>
> 
> > And whats with the dialog2stateview.xml, have i have to register it too
> > in some context param?
> >
> <snap/>
> 
> Thats from the old documentation page [3], which I pointed you to ;-)
> That bit is obsolete.
> 
</snap>

If this is obsolete, is their any way to map a state to a view, or have
i have to compose my state names according the view names?
A name "login" which goes to "profile" which i can map to views comes in
more handy, when the view is named like
"/path_to_my_view/profile_xyz.jsp".

Have i have to use this view name + path as id or can i still map
things?

Torsten