[seam-commits] Seam SVN: r8585 - trunk/src/main/org/jboss/seam/exception and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Aug 5 13:59:05 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-08-05 13:59:05 -0400 (Tue, 05 Aug 2008)
New Revision: 8585

Modified:
   branches/Seam_2_0/src/main/org/jboss/seam/exception/ConfigRedirectHandler.java
   branches/Seam_2_0/src/main/org/jboss/seam/exception/Exceptions.java
   trunk/src/main/org/jboss/seam/exception/ConfigRedirectHandler.java
   trunk/src/main/org/jboss/seam/exception/Exceptions.java
Log:
JBSEAM-3190

Modified: branches/Seam_2_0/src/main/org/jboss/seam/exception/ConfigRedirectHandler.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/exception/ConfigRedirectHandler.java	2008-08-05 17:26:27 UTC (rev 8584)
+++ branches/Seam_2_0/src/main/org/jboss/seam/exception/ConfigRedirectHandler.java	2008-08-05 17:59:05 UTC (rev 8585)
@@ -47,7 +47,14 @@
    @Override
    protected String getViewId(Exception e)
    {
-      return id.getValue();
+      if (id != null)
+      {
+         return id.getValue(); 
+      }
+      else
+      {
+         return null;
+      }
    }
 
    @Override

Modified: branches/Seam_2_0/src/main/org/jboss/seam/exception/Exceptions.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/exception/Exceptions.java	2008-08-05 17:26:27 UTC (rev 8584)
+++ branches/Seam_2_0/src/main/org/jboss/seam/exception/Exceptions.java	2008-08-05 17:59:05 UTC (rev 8585)
@@ -161,7 +161,8 @@
          Severity severity = severityName==null ? 
                   FacesMessage.SEVERITY_INFO : 
                   Pages.getFacesMessageValuesMap().get( severityName.toUpperCase() );
-         return new ConfigRedirectHandler(Expressions.instance().createValueExpression(viewId, String.class), clazz, endConversation, message, severity);
+         return new ConfigRedirectHandler(viewId == null ? null : Expressions.instance().createValueExpression(
+               viewId, String.class), clazz, endConversation, message, severity);
       }
       
       Element error = exception.element("http-error");

Modified: trunk/src/main/org/jboss/seam/exception/ConfigRedirectHandler.java
===================================================================
--- trunk/src/main/org/jboss/seam/exception/ConfigRedirectHandler.java	2008-08-05 17:26:27 UTC (rev 8584)
+++ trunk/src/main/org/jboss/seam/exception/ConfigRedirectHandler.java	2008-08-05 17:59:05 UTC (rev 8585)
@@ -47,7 +47,14 @@
    @Override
    protected String getViewId(Exception e)
    {
-      return id.getValue();
+      if (id != null)
+      {
+         return id.getValue(); 
+      }
+      else
+      {
+         return null;
+      }
    }
 
    @Override

Modified: trunk/src/main/org/jboss/seam/exception/Exceptions.java
===================================================================
--- trunk/src/main/org/jboss/seam/exception/Exceptions.java	2008-08-05 17:26:27 UTC (rev 8584)
+++ trunk/src/main/org/jboss/seam/exception/Exceptions.java	2008-08-05 17:59:05 UTC (rev 8585)
@@ -206,14 +206,14 @@
       Element redirect = exception.element("redirect");
       if (redirect!=null)
       {
-         final String viewId = redirect.attributeValue("view-id");
+         String viewId = redirect.attributeValue("view-id");
          Element messageElement = redirect.element("message");
          final String message = messageElement==null ? null : messageElement.getTextTrim();
          String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
          Severity severity = severityName==null ? 
                   FacesMessage.SEVERITY_INFO : 
                   Pages.getFacesMessageValuesMap().get( severityName.toUpperCase() );
-         return new ConfigRedirectHandler(Expressions.instance().createValueExpression(
+         return new ConfigRedirectHandler(viewId == null ? null : Expressions.instance().createValueExpression(
                viewId, String.class), clazz, endConversation, message, severity);
       }
       




More information about the seam-commits mailing list