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 2011/01/10 22:21:08 UTC
svn commit: r1057371 -
/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java
Author: lofwyr
Date: Mon Jan 10 21:21:08 2011
New Revision: 1057371
URL: http://svn.apache.org/viewvc?rev=1057371&view=rev
Log:
revert, because its not compatible with 1.1
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java?rev=1057371&r1=1057370&r2=1057371&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/VariableResolverUtils.java Mon Jan 10 21:21:08 2011
@@ -19,7 +19,6 @@ package org.apache.myfaces.tobago.util;
import org.apache.myfaces.tobago.context.ClientProperties;
-import javax.el.ELContext;
import javax.faces.application.Application;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
@@ -35,14 +34,15 @@ public final class VariableResolverUtils
* Returns the requested object configured in the faces-config or from library.
*/
public static Object resolveVariable(FacesContext context, String variable) {
- if (FacesVersion.supports12()) {
- final ELContext elContext = context.getELContext();
- return elContext.getELResolver().getValue(elContext, null, variable);
- } else {
+// TODO: JSF 1.2
+// if (FacesVersion.supports12()) {
+// final ELContext elContext = context.getELContext();
+// return elContext.getELResolver().getValue(elContext, null, variable);
+// } else {
final Application application = context.getApplication();
final VariableResolver variableResolver = application.getVariableResolver();
return variableResolver.resolveVariable(context, variable);
- }
+// }
}
/**
@@ -59,13 +59,14 @@ public final class VariableResolverUtils
* Also useful to enforce a new creation of a managed-bean.
*/
public static void clearVariable(FacesContext context, String variable) {
- if (FacesVersion.supports12()) {
- final ELContext elContext = context.getELContext();
- elContext.getELResolver().setValue(elContext, null, variable, null);
- } else {
+// TODO: JSF 1.2
+// if (FacesVersion.supports12()) {
+// final ELContext elContext = context.getELContext();
+// elContext.getELResolver().setValue(elContext, null, variable, null);
+// } else {
final Application application = context.getApplication();
final ValueBinding valueBinding = application.createValueBinding("#{" + variable + "}");
valueBinding.setValue(context, null);
- }
+// }
}
}