[seam-commits] Seam SVN: r8291 - trunk/src/main/org/jboss/seam/navigation.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed May 28 07:57:16 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-05-28 07:57:16 -0400 (Wed, 28 May 2008)
New Revision: 8291

Modified:
   trunk/src/main/org/jboss/seam/navigation/Pages.java
Log:
JBSEAM-2352 - don't actually set a value expression if the expression string isn't specified

Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-05-27 17:50:04 UTC (rev 8290)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-05-28 11:57:16 UTC (rev 8291)
@@ -881,7 +881,7 @@
       for (int i=stack.size()-1; i>=0; i--)
       {
          Page page = stack.get(i);
-         if (page.getNoConversationViewId() != null && page.getNoConversationViewId().getExpressionString() != null)
+         if (page.getNoConversationViewId() != null)
          {
             String noConversationViewId = page.getNoConversationViewId().getValue();
             if (noConversationViewId!=null)
@@ -890,9 +890,7 @@
             }
          }
       }
-      return this.noConversationViewId != null && this.noConversationViewId.getExpressionString() != null
-            ? this.noConversationViewId.getValue()
-            : null;
+      return this.noConversationViewId != null ? this.noConversationViewId.getValue() : null;
    }
    
    /**
@@ -930,7 +928,11 @@
       Element root = getDocumentRoot(stream);
       if (noConversationViewId==null) //let the setting in components.xml override the pages.xml
       {
-         noConversationViewId = Expressions.instance().createValueExpression(root.attributeValue("no-conversation-view-id"), String.class);
+         String noConversationViewIdString = root.attributeValue("no-conversation-view-id");
+         if (noConversationViewIdString != null)
+         {
+            noConversationViewId = Expressions.instance().createValueExpression(noConversationViewIdString, String.class);
+         }
       }
       if (loginViewId==null) //let the setting in components.xml override the pages.xml
       {
@@ -1066,7 +1068,11 @@
          page.setTimeout(Integer.parseInt(timeoutString));
       }
       
-      page.setNoConversationViewId(Expressions.instance().createValueExpression(element.attributeValue("no-conversation-view-id"), String.class));
+      String noConversationViewIdString = element.attributeValue("no-conversation-view-id");
+      if (noConversationViewIdString != null)
+      {
+         page.setNoConversationViewId(Expressions.instance().createValueExpression(noConversationViewIdString, String.class));
+      }
       page.setConversationRequired("true".equals(element.attributeValue("conversation-required")));
       page.setLoginRequired("true".equals(element.attributeValue("login-required")));
       page.setScheme(element.attributeValue("scheme"));




More information about the seam-commits mailing list