You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Jonathan Asbell <ja...@i-2000.com> on 2001/06/05 13:24:50 UTC

question about Action Forwards in struts-config

I have boiled down action forward to a few exact situations.  I would only want to do any of the following situations:
1) take me back where I was
2) take me back to where I was trying to go
3) take me to a specific page
4) take me to a default page

I dont believe there is currently a neat and clean way of describing this in the struts-config.  Maybe there doesnt need to be for things like "where I was trying to go" and "where I was".  I am just looking for some clarity on the issues and what/why the implementation is what it is currently is

Re: question about Action Forwards in struts-config

Posted by Ted Husted <hu...@apache.org>.
The idea of begin able to script a workflow in struts-config has been
kicked around a bit, but I don't think anyone has brought any code to
the table. 

Personally, I'm starting to play around with the idea of a stack that
would push URIs that were part of a workflow, and the concept of "done"
actions that would pop the URIs before returning to a default "done"
(like say a menu). If the stack was empty, it would return null, and the
default forwarding would fall through somehow.

I've done this to a limited extent by setting and checking a single
session attribute at specific places, and it worked rather well.

A companion piece to this I'm considering is a key tracking object that
I could use to fill-in the foreign keys on input forms. (I have some
complex forms with several foreign keys.) The idea being I would put an
input form into the session until it was inserted. Other input and
selection actions could then report their lastest key accessed to the
tracking object, who would update any related input form stored in the
users session. (Like a controller.) This way you could wander around
looking up this and that, and when you got back to your half-finished
input form, the related keys would be filled in with whatever your
lastest visits. (I'm not explaining this very well; code to follow if I
do it.)

> Jonathan Asbell wrote:
> 
> I have boiled down action forward to a few exact situations.  I would
> only want to do any of the following situations:
> 1) take me back where I was
> 2) take me back to where I was trying to go
> 3) take me to a specific page
> 4) take me to a default page
> 
> I dont believe there is currently a neat and clean way of describing
> this in the struts-config.  Maybe there doesnt need to be for things
> like "where I was trying to go" and "where I was".  I am just looking
> for some clarity on the issues and what/why the implementation is what
> it is currently is