On 9/5/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
On 9/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Author: schof
> Date: Mon Sep  4 18:45:12 2006
> New Revision: 440216
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=440216
> Log:
> LegacyDialogContext should not throw an exception when the transition
> cannot be found during the advance method.  Instead return a null view id
> and let the wrapped NavigationHandler try to recover.  (SHALE-276)


I'm going to need to look at this in more detail (probably not until
tomorrow night), but I do not believe in the stated premises behind this
change (and am therefore pretty unlikely to agree with the implemented
solution).  Instead, I believe:

* Once you are inside a dialog, the dialog should be the *only* thing that
manages navigation.
  There should be *no such thing* as "outcomes not managed by this dialog"
-- any other approach
  leads to totally non-deterministic behavior that quickly becomes
impossible to debug.  Based
  on this, delegating to the wrapped navigation handler (while inside a
dialog) seems to me like an
  exceedingly BAD idea.

<snip/>

(I've read the rest of the thread).

I think delegation is useful, and pretty much necessary for null
outcomes such as those in SHALE-10 [1]. The mantra if we don't
understand it, we must delegate it -- what I call inconsequential
triggers (inconsequential to the progress of the dialog, that is) --
may also have certain advantages, for example, header & footer style
markup that is disconnected from the dialog. IIRC, one of the usecases
on the user list was running a dialog where each participating view
has a "global navigation" menubar on the side, which seems like a
routine thing to want.

However, as stated above, such delegation adds another dimension to
the authoring, especially for cases such as wrapped handlers having
navigation rules involving blanket patterns etc. where things just got
a bit trickier. Since dialogs can't (yet) afford to have the view
changed from underneath them, it probably means there is some gray
area regarding the ownership of suspension (if there is such a scheme)
or cancellation of the dialog if and when such a departure occurs.

-Rahul

[1] http://issues.apache.org/struts/browse/SHALE-10

Reply via email to