You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/05/11 16:09:11 UTC

DO NOT REPLY [Bug 34865] New: - Create Default Transitions for Dialogs

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34865>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34865

           Summary: Create Default Transitions for Dialogs
           Product: Struts
           Version: 1.2.4
          Platform: Macintosh
        OS/Version: Mac OS X 10.3
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Shale
        AssignedTo: dev@struts.apache.org
        ReportedBy: dgeary@apache.org


We could make defining dialogs much easier with some default transitions. If we
assume that the dialog states in dialog-config.xml are listed in the order they
are traversed, we could provide default "next" and "previous" transitions for
each state, except of course, there would be no "previous" transition for the
first state, and no "next" transition for the previous state. Any explicit
"next" or "previous" states declared in dialog-config.xml would override the
defaults.

It also seems like a common requirement to have dialog-scope transitions (not
state-scope) for each state in the dialog. For example, many wizards have tabs
that let you jump from one wizard panel to the next, regardless of the currently
displayed wizard panel. We could also create default dialog-scope transitions
whose outcomes and targets match the state names. Again, you could override
those defaults by providing your own transitions.

With those changes, we would reduce this:

<dialogs>
  <dialog            name="Create Account"
                    start="User Information">

    <transition outcome="User Information" target="User Information"/>
    <transition outcome="Address"          target="Address"/>
    <transition outcome="Phone Numbers"    target="Phone Numbers"/>
    <transition outcome="Summary"          target="Summary"/>
    <transition outcome="Exit"             target="Exit"/>

    <view            name="User Information"
                   viewId="/pages/account.jsp">

      <transition outcome="next"
                   target="Phone Numbers"/>

    </view>

    <view            name="Phone Numbers"
                   viewId="/pages/account.jsp">

      <transition outcome="next"
                   target="Address"/>

      <transition outcome="previous"
                   target="User Information"/>

    </view>

    <view            name="Address"
                   viewId="/pages/account.jsp">

      <transition outcome="next"
                   target="Summary"/>

      <transition outcome="previous"
                   target="Phone Numbers"/>

    </view>

    <view            name="Summary"
                   viewId="/pages/account.jsp">

      <transition outcome="previous"
                   target="Address"/>

    </view>

    <end             name="Exit"
                   viewId="/pages/login.jsp">

    </end>
  </dialog>
</dialogs>

To this:

<dialogs>
  <dialog            name="Create Account"
                    start="User Information">

    <view            name="User Information"
                   viewId="/pages/account.jsp"/>

    <view            name="Phone Numbers"
                   viewId="/pages/account.jsp"/>

    <view            name="Address"
                   viewId="/pages/account.jsp"/>

    <view            name="Summary"
                   viewId="/pages/account.jsp"/>

    <end             name="Exit"
                   viewId="/pages/login.jsp">

    </end>
  </dialog>
</dialogs>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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