[jboss-cvs] jboss-seam/src/pdf/org/jboss/seam/pdf ...

Peter Muir peter at bleepbleep.org.uk
Mon Jul 9 08:57:40 EDT 2007


  User: pmuir   
  Date: 07/07/09 08:57:40

  Modified:    src/pdf/org/jboss/seam/pdf  DocumentStore.java
  Log:
  Factor out getDefaultSuffix
  
  Revision  Changes    Path
  1.11      +3 -6      jboss-seam/src/pdf/org/jboss/seam/pdf/DocumentStore.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DocumentStore.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/pdf/org/jboss/seam/pdf/DocumentStore.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- DocumentStore.java	12 Jun 2007 16:55:45 -0000	1.10
  +++ DocumentStore.java	9 Jul 2007 12:57:40 -0000	1.11
  @@ -15,6 +15,7 @@
   import org.jboss.seam.annotations.Name;
   import org.jboss.seam.annotations.Scope;
   import org.jboss.seam.pdf.DocumentData.DocType;
  +import org.jboss.seam.ui.util.Faces;
   
   @Name("org.jboss.seam.pdf.documentStore")
   @Scope(ScopeType.CONVERSATION)
  @@ -73,7 +74,7 @@
       public String preferredUrlForContent(String baseName, DocType docType, String contentId) 
       {
          FacesContext context = FacesContext.getCurrentInstance();
  -       String url = context.getApplication().getViewHandler().getActionURL(context, "/seam-doc" + getDefaultSuffix(context));
  +       String url = context.getApplication().getViewHandler().getActionURL(context, "/seam-doc" + Faces.getDefaultSuffix(context));
          String baseUrl = context.getExternalContext().encodeActionURL(url);
         
          if (useExtensions) 
  @@ -85,11 +86,7 @@
       }
       
       
  -    private static String getDefaultSuffix(FacesContext context) throws FacesException {
  -        ExternalContext externalContext = context.getExternalContext();
  -        String viewSuffix = externalContext.getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
  -        return (viewSuffix != null) ? viewSuffix : ViewHandler.DEFAULT_SUFFIX;
  -    }
  +    
       
   }
      
  
  
  



More information about the jboss-cvs-commits mailing list