struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jouravlev <jmi...@gmail.com>
Subject Re: [shale] escaping and resuming dialog
Date Fri, 17 Feb 2006 20:34:47 GMT
On 2/17/06, Timo Schnölzer <tschnoelzer@nsdcom.de> wrote:
> Hi folks,
>
> my dialogs are working fine in shale with clay for composition. Now i am
> wondering how to achieve the following:
>
> Usecase:
>
> User is working in a defined dialog, say with view 1 to 10. when arrived in
> "view 5" he wants to use a link not beeing a workflow link, e.g. "my
> account" or "what ever comes from main navigation".
>
> This leads into the following (understandable) error:
>
> java.lang.IllegalArgumentException:
> You have requested a transition outcome named "home" from a state named
> "config" in a dialog named "Configuration",
> but no transition definition can be found.
> Double check the spelling of the transition outcome name.
>
> Now as i have a structure that the user is allowed to click "outside" a
> dialog and resume later, how to deal with this???

I believe that this is deficiency of Shale Dialogs as well as of
Spring Web Flow where Shale Dialogs originated from, as well as the
whole concept of flow.

  *** There is no flow ***

The above sounds almost like a quote from Matrix. Flow as in "flow
between pages" is a wrong concept. I played with it for about three
years and ultimately threw it out.

What you have is not a flow from view 1 to view 10 (which translates
to "page 1 to page 10"), because (another Matrix-like statement):

  *** There is no page ***

Page is nothing. View is nothing. View presents web resource according
to resource state.

What you actually have is a web resource that has 10 views
corresponding to 10 (or more) states of resource. When you navigate to
a location of the web resource, it selects a proper view and displayes
it. When you submit data from a browser, the web resouce can
distinguish whether it can accept this particular data while being in
the current state or cannot. If not, it rejects it and displays a page
corresponding to a state or transfers control somewhere else, for
example to error resource. If resource accepts input data, it
processes it and optionally, changes its state.

When you move "out of the dialog" you simply leave one resource and
navigate to another resource. When you "return back to the dialog" you
navigate to original resource; it has to pick up a page corresponding
to its current state and display it. Of course this works only if
state is saved in the session, because you cannot move viewstate
around all the links you want to visit, what if you go to some
external websites.

Flow is an attempt to track state (and state changes) in a stateless
environment. Just use real state, and you won't have to use flow.

Michael.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message