[seam-commits] Seam SVN: r9014 - trunk/src/main/org/jboss/seam/mock.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Sep 18 07:21:46 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-09-18 07:21:46 -0400 (Thu, 18 Sep 2008)
New Revision: 9014

Modified:
   trunk/src/main/org/jboss/seam/mock/MockViewHandler.java
Log:
ws

Modified: trunk/src/main/org/jboss/seam/mock/MockViewHandler.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/MockViewHandler.java	2008-09-18 09:13:58 UTC (rev 9013)
+++ trunk/src/main/org/jboss/seam/mock/MockViewHandler.java	2008-09-18 11:21:46 UTC (rev 9014)
@@ -31,24 +31,29 @@
 	}
 
 	@Override
-	public String getActionURL(FacesContext ctx, String viewId) 
+	public String getActionURL(FacesContext ctx, String viewId)
    {
-	   String contextPath = ctx.getExternalContext().getRequestContextPath();
-	   String pathInfo    = ctx.getExternalContext().getRequestPathInfo();
-	   String servletPath = ctx.getExternalContext().getRequestServletPath();
-	   
-	   if (Strings.isEmpty(pathInfo)) {
-	      int loc = viewId.lastIndexOf('.');
-	      if (loc<0) throw new IllegalArgumentException("no file extension in view id: " + viewId);
-	      int sploc = servletPath.lastIndexOf('.');
-	      if (sploc<0) throw new IllegalArgumentException("no file extension in servlet path: " + servletPath);
-	      return contextPath + viewId.substring(0, loc) + servletPath.substring(sploc);
-	      
-	   } else {
-	      return contextPath + servletPath + viewId;
-	   }
-	}
+      String contextPath = ctx.getExternalContext().getRequestContextPath();
+      String pathInfo = ctx.getExternalContext().getRequestPathInfo();
+      String servletPath = ctx.getExternalContext().getRequestServletPath();
 
+      if (Strings.isEmpty(pathInfo))
+      {
+         int loc = viewId.lastIndexOf('.');
+         if (loc < 0)
+            throw new IllegalArgumentException("no file extension in view id: " + viewId);
+         int sploc = servletPath.lastIndexOf('.');
+         if (sploc < 0)
+            throw new IllegalArgumentException("no file extension in servlet path: " + servletPath);
+         return contextPath + viewId.substring(0, loc) + servletPath.substring(sploc);
+
+      }
+      else
+      {
+         return contextPath + servletPath + viewId;
+      }
+   }
+
 	@Override
 	public String getResourceURL(FacesContext ctx, String url) 
    {




More information about the seam-commits mailing list