[jboss-cvs] jboss-seam/src/main/org/jboss/seam/mock ...

Norman Richards norman.richards at jboss.com
Thu Aug 9 14:12:32 EDT 2007


  User: nrichards
  Date: 07/08/09 14:12:32

  Modified:    src/main/org/jboss/seam/mock  MockViewHandler.java
  Log:
  JBSEAM-1776
  
  Revision  Changes    Path
  1.9       +14 -14    jboss-seam/src/main/org/jboss/seam/mock/MockViewHandler.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MockViewHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/mock/MockViewHandler.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- MockViewHandler.java	21 Jul 2007 05:41:37 -0000	1.8
  +++ MockViewHandler.java	9 Aug 2007 18:12:32 -0000	1.9
  @@ -34,17 +34,17 @@
   	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(servletPath) ) 
  -      {
  +	   
  +	   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
  -      {
  +	      
  +	   } else {
            return contextPath + servletPath + viewId;
         }
   	}
  
  
  



More information about the jboss-cvs-commits mailing list