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)

Modified:
    
shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogContext.java

Modified: 
shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogContext.java
URL: 
http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogContext.java?view=diff&rev=440216&r1=440215&r2=440216
==============================================================================
--- 
shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogContext.java
 (original)
+++ 
shale/sandbox/shale-dialog2-legacy/src/main/java/org/apache/shale/dialog2/legacy/LegacyDialogContext.java
 Mon Sep  4 18:45:12 2006
@@ -219,7 +219,15 @@
     public String advance(FacesContext context, String outcome) {
 
         Position position = peek();
-        transition(position, outcome);
+
+        try {
+            transition(position, outcome);
+        } catch (IllegalStateException ie) {
+            // The transition method didn't like our outcome but its possible 
we can
+            // recover if the outcome was intended for a different 
NavigationHandler
+            return null;
+        }
+
         State state = position.getState();
         while (true) {
             if (state instanceof ActionState) {


Reply via email to