You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2009/05/15 18:27:40 UTC
svn commit: r775218 -
/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
Author: matzew
Date: Fri May 15 16:27:40 2009
New Revision: 775218
URL: http://svn.apache.org/viewvc?rev=775218&view=rev
Log:
MYFACES-2235 - ProjectStage extension
added check for "org.apache.myfaces.PROJECT_STAGE" system_property
Modified:
myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=775218&r1=775217&r2=775218&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java Fri May 15 16:27:40 2009
@@ -117,6 +117,9 @@
// recives the runtime config instance during initializing
private final static ThreadLocal<RuntimeConfig> initializingRuntimeConfig = new ThreadLocal<RuntimeConfig>();
+ // MyFaces specific System Property to set the ProjectStage, if not present via the standard way
+ public final static String MYFACES_PROJECT_STAGE_SYSTEM_PROPERTY_NAME = "org.apache.myfaces.PROJECT_STAGE";
+
// ~ Instance fields
// --------------------------------------------------------------------------
// --
@@ -651,6 +654,14 @@
stageName = context.getExternalContext().getInitParameter(ProjectStage.PROJECT_STAGE_PARAM_NAME);
}
+ /*
+ * If not found so far, let's try the Apache MyFaces extension (see MYFACES-2235)
+ */
+ if (stageName == null)
+ {
+ stageName = System.getProperty(MYFACES_PROJECT_STAGE_SYSTEM_PROPERTY_NAME);
+ }
+
// If a value is found found
if (stageName != null)
{