Author: pete.muir(a)jboss.org
Date: 2008-09-18 07:31:58 -0400 (Thu, 18 Sep 2008)
New Revision: 9015
Added:
trunk/src/main/org/jboss/seam/util/Faces.java
Modified:
trunk/src/main/org/jboss/seam/document/DocumentStore.java
Log:
refactor out the getSuffix method
Modified: trunk/src/main/org/jboss/seam/document/DocumentStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/document/DocumentStore.java 2008-09-18 11:21:46 UTC (rev
9014)
+++ trunk/src/main/org/jboss/seam/document/DocumentStore.java 2008-09-18 11:31:58 UTC (rev
9015)
@@ -13,6 +13,7 @@
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.util.Faces;
@Name("org.jboss.seam.document.documentStore")
@Scope(ScopeType.CONVERSATION)
@@ -85,16 +86,9 @@
FacesContext context = FacesContext.getCurrentInstance();
ViewHandler handler = context.getApplication().getViewHandler();
String url = handler.getActionURL(context,
- DOCSTORE_BASE_URL + getDefaultSuffix(context));
+ DOCSTORE_BASE_URL + Faces.getDefaultSuffix(context));
return context.getExternalContext().encodeActionURL(url);
}
}
-
- public static String getDefaultSuffix(FacesContext context)
- throws FacesException
- {
- String viewSuffix =
context.getExternalContext().getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
- return (viewSuffix != null) ? viewSuffix : ViewHandler.DEFAULT_SUFFIX;
- }
+
}
-
Added: trunk/src/main/org/jboss/seam/util/Faces.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Faces.java (rev 0)
+++ trunk/src/main/org/jboss/seam/util/Faces.java 2008-09-18 11:31:58 UTC (rev 9015)
@@ -0,0 +1,16 @@
+package org.jboss.seam.util;
+
+import javax.faces.FacesException;
+import javax.faces.application.ViewHandler;
+import javax.faces.context.FacesContext;
+
+public class Faces
+{
+
+ public static String getDefaultSuffix(FacesContext context) throws FacesException
+ {
+ String viewSuffix =
context.getExternalContext().getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
+ return (viewSuffix != null) ? viewSuffix : ViewHandler.DEFAULT_SUFFIX;
+ }
+
+}
Property changes on: trunk/src/main/org/jboss/seam/util/Faces.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain