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 2013/04/10 09:10:18 UTC

svn commit: r1466352 - in /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago: compat/FacesUtilsEL.java internal/util/ComponentAttributeUtils.java

Author: lofwyr
Date: Wed Apr 10 07:10:18 2013
New Revision: 1466352

URL: http://svn.apache.org/r1466352
Log:
TOBAGO-1221: Remove JSF 1.1 support

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/compat/FacesUtilsEL.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/ComponentAttributeUtils.java

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/compat/FacesUtilsEL.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/compat/FacesUtilsEL.java?rev=1466352&r1=1466351&r2=1466352&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/compat/FacesUtilsEL.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/compat/FacesUtilsEL.java Wed Apr 10 07:10:18 2013
@@ -175,7 +175,7 @@ public class FacesUtilsEL {
   }
 
   /**
-   * @deprecated Since 2.0.0, please use createValueExpression()
+   * @deprecated Since 2.0.0, please use {@link FacesUtilsEL#createValueExpression(String string)}
    */
   @Deprecated
   public static Object createExpressionOrBinding(String string) {

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/ComponentAttributeUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/ComponentAttributeUtils.java?rev=1466352&r1=1466351&r2=1466352&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/ComponentAttributeUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/util/ComponentAttributeUtils.java Wed Apr 10 07:10:18 2013
@@ -19,22 +19,18 @@
 
 package org.apache.myfaces.tobago.internal.util;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.myfaces.tobago.compat.FacesUtilsEL;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
 
-
 public class ComponentAttributeUtils {
 
-  private static final Logger LOG = LoggerFactory.getLogger(ComponentAttributeUtils.class);
-
   public static void setBooleanProperty(UIComponent component, String name, String value) {
     if (value != null) {
       if (isValueReference(value)) {
-        component.setValueBinding(name, createValueBinding(value));
+        component.setValueExpression(name, FacesUtilsEL.createValueExpression(value));
       } else {
         component.getAttributes().put(name, Boolean.valueOf(value));
       }
@@ -44,7 +40,7 @@ public class ComponentAttributeUtils {
   public static void setStringProperty(UIComponent component, String name, String value) {
     if (value != null) {
       if (isValueReference(value)) {
-        component.setValueBinding(name, createValueBinding(value));
+        component.setValueExpression(name, FacesUtilsEL.createValueExpression(value));
       } else {
         component.getAttributes().put(name, value);
       }
@@ -61,6 +57,10 @@ public class ComponentAttributeUtils {
       return (end >=0 && start < end);
   }
 
+  /**
+   * @deprecated Since 2.0.0, please use {@link FacesUtilsEL#createValueExpression(String string)}
+   */
+  @Deprecated
   public static ValueBinding createValueBinding(String value) {
     return FacesContext.getCurrentInstance().getApplication().createValueBinding(value);
   }