----- Original Message -----
From: "Ted Husted" <[EMAIL PROTECTED]>
> On 1/10/2001 at 11:27 PM Laird J. Nelson wrote:
> > What is now needed is a navigation stack of some kind--perhaps even
> something that is written/phrased in terms of "traditional" UI
> metaphors.
> The other place this idea comes up is the problem with users
> bookmarking pages that require a form-based login.

Although in a J2EE context, that problem is solved for you by the
servlet container (something the vast majority of websites I've seen
don't seem to be aware of--i.e. that a lot of authentication-related
behavior is provided to you for free).

> One solution, that I admittedly have not tried, might be to set an
> attribute in the session context that your Actions would monitor, if
> they might need to return to some arbitrary place in your application.

What I'd love to have happen (warning; more thinking out loud) is to
make it so that Actions don't have to have *any* if/then logic in them
at all for these kinds of cases (if possible).  Every time you have to
say to one of your developers, "Please remember to put in the
check-for-the-logged-in-user's-name check at the top of each
page/servlet", you run the risk of having one of them forget to do this.
Or, to put it another way, this navigation stuff should probably go in
the controller servlet somehow.

> >Now think that somewhere in that flow a *logical* dialog box is
> supposed to present itself .. If the answer is Yes, then the next
> "screen" should be, well, the next screen.  If the answer is no, then
> the next "screen" should be the very same page that triggered this
> "dialog box" to appear, since after all when you dismiss a dialog box
> it goes away, leaving you right where you were before.
>
> I think here the "logical dialog box" would be the action, and the yes
> and no answers are mappings for that action from the
struts-config.xml.
> So your config might actually say, for "yes" forward to this path or
> action, or for "no" forward to that path or action.

But that information is not static.  "No" might return me to different
paths depending on where I was coming from (i.e. depending on where the
"dialog box" was invoked from).  Because, remember, "returning to a
page" is webspeak for "dismissing the dialog box" in regular UIspeak.
So even in the struts-config.xml, with all of its mapping semantics, you
can't always know where the user should be taken.

> If we needed "no"
> to go so some arbitrary page, then that might be something we can save
> and restore from the session context. It's also possible that the
> referer header could be used for automatic returns to a "grandparent"
> page.

Right; lots of frameworks and such handle cases back to the grandparent
level.  I'm suggesting that this should be generalized to handle any
ancestor as well.

> It's possible that we already have that functionality in the Action
> mappings. Each action can have it's own set of logical forwardings, or
> refer to a set of global forwardings. A nice feature here is that you
> can change and reload the mappings, without recompiling source!

Right, but you don't always have the information to build those mappings
in the first place.

Cheers,
Laird

--
[EMAIL PROTECTED]
http://www.amherst.edu/~ljnelson/
Good, cheap, fast: pick two.

Reply via email to