Using implicit transitions to maintain client - dialog alignment in Shale dialogs

UI Test Case Shale distro *
download war ^
Shale distro with implicit transitons **
download war ^ | see code ^^
1.
  1. Proceed to view (profile/profile2.jsp) in Edit Profile dialog
  2. Navigate to view (profile/profile1.jsp) using browser's Back button.
  3. Fill out username/passwords, click Next (no response).
  4. Repeat (3), dialog transitions to view (profile/profile3).
  1. Proceed to view (profile/profile2.jsp) in Edit Profile dialog
  2. Navigate to view (profile/profile1.jsp) using browser's Back button.
  3. Fill out username/passwords, click Next (no response).
  4. Repeat (3), dialog transitions to expected ViewState (profile/profile2).
  • The server-side dialog isn't aware of (2) and continues to believe the dialog state is as it was in (1) i.e. ViewState for (profile/profile2.jsp).
  • Instead of next from page 1 in (4) taking us to page 2, it takes us to page 3 i.e. ViewState for (profile/profile3.jsp).
  • In this test case, the ViewState's for page 1 and page 2 coincidently have similar transitions ("next"), so we don't see an exception, though we're actually looking at the incorrect transition set.
  • The server-side dialog isn't aware of (2) and continues to believe the dialog state is as it was in (1) i.e. ViewState for (profile/profile2.jsp).
  • When the next outcome reaches the DialogNavigationHandler, it ascertains the user / client has navigated away from the previous view, and aligns itself to the correct ViewState i.e. ViewState for (profile/profile1.jsp).
  • The dialog can now evaluate the correct set of transitions and steps to the expected ViewState (profile/profile2.jsp).
2.
  1. Proceed to view (profile/profile1.jsp) in Edit Profile dialog
  2. Navigate to view (profile/logon.jsp) using browser's Back button.
  3. Click create profile link (no response).
  4. Repeat (3), IllegalArgumentException is thrown.
  1. Proceed to view (profile/profile1.jsp) in Edit Profile dialog
  2. Navigate to view (profile/logon.jsp) using browser's Back button.
  3. Click create profile link (no response).
  4. Repeat (3), dialog transitions to expected ViewState (profile/profile1).
  • The difference (as compared to test case 1) being the two ViewState's in question do not have similar transitions ("create"), causing the exception.
  • As in case 1, since the dialog corrects its ViewState before attempting the proceed, it navigates to the expected ViewState (profile/profile1.jsp).

*  - Copied unmodified from the 11/4 nightlies
** - Using SCXML dialogs, see
SCXML in Shale, plus implicit transitions (see below)
^  - Rename to .war since file will probably download with .zip appended
^^ - Things to see in code are the nested class ImplicitTransitionsDecorator and the TriggerEvent when source view for outcome is not the expected viewId

Implicit Transitions

Open Issues

  1. What causes the lack of response in (3) in either use cases?

Please send an email to the appropriate Struts mailing list if you can explain / want to propose a solution for any of the open issues, or have other comments.

Disclaimer

This material has not been reviewed by the Apache Struts Shale team.