You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/11/10 10:32:55 UTC

svn commit: r1033401 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/util/ tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/compat/ tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/util/

Author: lofwyr
Date: Wed Nov 10 09:32:54 2010
New Revision: 1033401

URL: http://svn.apache.org/viewvc?rev=1033401&view=rev
Log:
use version util

Added:
    myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java   (contents, props changed)
      - copied, changed from r1033398, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java
Removed:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java
Modified:
    myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/compat/FacesUtils.java

Modified: myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/compat/FacesUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/compat/FacesUtils.java?rev=1033401&r1=1033400&r2=1033401&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/compat/FacesUtils.java (original)
+++ myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/compat/FacesUtils.java Wed Nov 10 09:32:54 2010
@@ -20,11 +20,11 @@ package org.apache.myfaces.tobago.compat
 import org.apache.myfaces.tobago.event.TabChangeSource;
 import org.apache.myfaces.tobago.event.ValueBindingPopupActionListener;
 import org.apache.myfaces.tobago.event.ValueBindingTabChangeListener;
+import org.apache.myfaces.tobago.util.FacesVersion;
 import org.apache.myfaces.tobago.util.ValueBindingComparator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.faces.application.Application;
 import javax.faces.component.ActionSource;
 import javax.faces.component.ContextCallback;
 import javax.faces.component.EditableValueHolder;
@@ -48,17 +48,7 @@ public class FacesUtils {
 
   public static final Class[] VALIDATOR_ARGS = {FacesContext.class, UIComponent.class, Object.class};
 
-
-  static {
-    try {
-      Application.class.getMethod("getExpressionFactory");
-      binding = false;
-    } catch (NoSuchMethodException e) {
-      binding = true;
-    }
-  }
-
-  private static boolean binding;
+  private static final boolean binding = !FacesVersion.supports12();
 
   public static boolean invokeOnComponent(
       FacesContext context, UIComponent component, String clientId, ContextCallback callback) {

Copied: myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java (from r1033398, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java?p2=myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java&p1=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java&r1=1033398&r2=1033401&rev=1033401&view=diff
==============================================================================
    (empty)

Propchange: myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-jsf-compat/src/main/java/org/apache/myfaces/tobago/util/FacesVersion.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL