Expresso frameworks has the concept of states within a Controller (a direct subclass
jakarta struts action). Where can write states, which are methods prefix with "run" and
and suffixed with "State"  such as

MyController extends Controller {

     public void runPromptLoginState( .... ) {  }

     public void runProcessLoginState( .... ) {  }

     public void runPromptSubscriptionState( .... ) {  }

     public void runProcessSubscriptionState( .... ) {  }
}

--
Peter Pilgrim                 ++44 (0)207-545-9923
                                                      //_\\
"Mathematics is essentially the study of islands of  =======
disparate subjects in a sea of ignorance."           || ! ||
Andrew Wiles _____________


---------------------------------------- Message History 
----------------------------------------


From: Ted Husted <[EMAIL PROTECTED]> on 25/10/2001 08:47 AST

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Re: Knowing where you came from


The problem is that, in a Web app, the client can request any valid URI
at any time, and the application has to deal with that.

Another way of looking at this is

+ what is our current state,
+ what changes are being requested to that state, and
+ can we make the change from the current state to the requested state.
+ if not, what other changes are required to move to the requested
state.

This is the general direction of the workflow project, where the state
is represented as a series of nested steps.

So if a request could not be completed because we were missing a name,
we could retain the current input, but roll back to the closest step
that captured a name, and proceed from there wizard-fashion.

For more about the workflow project see

http://jakarta.apache.org/struts/proposal-workflow.html

There also some preliminary Struts demo code in Struts-Simple

http://husted.com/struts/resources/struts-simple.zip


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/

[EMAIL PROTECTED] wrote:
>
> Hi,
>
> It seems pretty common for applications to need some kind of "what screen /
> logical function did the user get here from" mechanism.  I think it would
> be interesting to try to build an xml driven navigation tool that would
> work with struts forwardings / actions.
>
> The navigation bean could be kept on the session, and tell you:
> - what logical function the user is currently at
> - what logical functions should be available from the current function
> - what function the user was at, if any, before arriving at the current
> location - you could even keep a history here...
>
> For any given function, you can find out what the url is for that function
> or what the global forwarding is for it, or what the action name is for it.
>
> An XML file could be built to configure the navigation bean, i.e.
> <function name="viewWidgets" globalForwarding="viewWidgets">
>      <navigation name="addWidget" actionName="addWidget.do"/>
>      <navigation name="deleteWidget" actionName="deleteWidget.do"/>
>      <navigation name="viewCustomers" globalForwarding="viewCustomers"/>
> </function>
>
> You could use this for building navigation links in the JSPs dynamically
> and handling "where did I come from" context sensitive requirements.
>
> I'm sure there's a lot wrong with this idea ;-).
>
> Jim W.
> ThoughtWorks
>
> At 10:20 AM 10/23/01, [EMAIL PROTECTED] wrote:
> >In an Action, is there a way to determine if the request is coming from a
> >forward from another Action or from an "external" request?  I've thought
> >about storing in the session the last known request object and then
> >comparing against it every time any of my actions perform() get called to
> >see if the current request is the same as the last "known" request.  But
> >this feels clunky.
> >Are there any other ways to know where the request is coming from?
> >
> >         Eric
> >--
> >Eric Rizzo, Software Engineer
> >OpenNetwork Technologies
> >http://www.opennetwork.com
> >-----------------------------
> >I embrace my personality flaws, for without them
> >I might have no personality at all.
>
> Jim Weaver
> Software Developer - ThoughtWorks





--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.


Reply via email to