Author: pete.muir(a)jboss.org
Date: 2008-04-29 05:52:09 -0400 (Tue, 29 Apr 2008)
New Revision: 8072
Modified:
branches/Seam_2_0/src/main/org/jboss/seam/faces/FacesManager.java
branches/Seam_2_0/src/main/org/jboss/seam/faces/RedirectException.java
trunk/src/main/org/jboss/seam/faces/FacesManager.java
trunk/src/main/org/jboss/seam/faces/RedirectException.java
Log:
JBSEAM-2930
Modified: branches/Seam_2_0/src/main/org/jboss/seam/faces/FacesManager.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/faces/FacesManager.java 2008-04-29 08:52:03
UTC (rev 8071)
+++ branches/Seam_2_0/src/main/org/jboss/seam/faces/FacesManager.java 2008-04-29 09:52:09
UTC (rev 8072)
@@ -150,6 +150,10 @@
{
throw new IllegalStateException("attempted to redirect during
RENDER_RESPONSE phase");
}*/
+ if (viewId == null)
+ {
+ throw new RedirectException("cannot redirect to a null viewId");
+ }
FacesContext context = FacesContext.getCurrentInstance();
String url = context.getApplication().getViewHandler().getActionURL(context,
viewId);
if (parameters!=null)
@@ -180,6 +184,10 @@
@Override
public void redirect(String viewId, String conversationId)
{
+ if (viewId == null)
+ {
+ throw new RedirectException("cannot redirect to a null viewId");
+ }
FacesContext context = FacesContext.getCurrentInstance();
String url = context.getApplication().getViewHandler().getActionURL(context,
viewId);
url = encodeConversationId(url, viewId, conversationId);
Modified: branches/Seam_2_0/src/main/org/jboss/seam/faces/RedirectException.java
===================================================================
--- branches/Seam_2_0/src/main/org/jboss/seam/faces/RedirectException.java 2008-04-29
08:52:03 UTC (rev 8071)
+++ branches/Seam_2_0/src/main/org/jboss/seam/faces/RedirectException.java 2008-04-29
09:52:09 UTC (rev 8072)
@@ -10,4 +10,9 @@
super(ioe);
}
+ public RedirectException(String message)
+ {
+ super(message);
+ }
+
}
Modified: trunk/src/main/org/jboss/seam/faces/FacesManager.java
===================================================================
--- trunk/src/main/org/jboss/seam/faces/FacesManager.java 2008-04-29 08:52:03 UTC (rev
8071)
+++ trunk/src/main/org/jboss/seam/faces/FacesManager.java 2008-04-29 09:52:09 UTC (rev
8072)
@@ -158,6 +158,10 @@
{
throw new IllegalStateException("attempted to redirect during
RENDER_RESPONSE phase");
}*/
+ if (viewId == null)
+ {
+ throw new RedirectException("cannot redirect to a null viewId");
+ }
FacesContext context = FacesContext.getCurrentInstance();
String url = context.getApplication().getViewHandler().getActionURL(context,
viewId);
if (parameters!=null)
@@ -188,6 +192,10 @@
@Override
public void redirect(String viewId, String conversationId)
{
+ if (viewId == null)
+ {
+ throw new RedirectException("cannot redirect to a null viewId");
+ }
FacesContext context = FacesContext.getCurrentInstance();
String url = context.getApplication().getViewHandler().getActionURL(context,
viewId);
url = encodeConversationId(url, viewId, conversationId);
Modified: trunk/src/main/org/jboss/seam/faces/RedirectException.java
===================================================================
--- trunk/src/main/org/jboss/seam/faces/RedirectException.java 2008-04-29 08:52:03 UTC
(rev 8071)
+++ trunk/src/main/org/jboss/seam/faces/RedirectException.java 2008-04-29 09:52:09 UTC
(rev 8072)
@@ -10,4 +10,8 @@
super(ioe);
}
+ public RedirectException(String message)
+ {
+ super(message);
+ }
}
Show replies by date