You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/03/17 20:47:10 UTC

svn commit: r1082663 - in /myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean: AliasBean.java AliasBeansScope.java

Author: lu4242
Date: Thu Mar 17 19:47:10 2011
New Revision: 1082663

URL: http://svn.apache.org/viewvc?rev=1082663&view=rev
Log:
TOMAHAWK-1562 tomahawk20-1.1.10 for JSF 2 does not work: aliasBean

Modified:
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java
    myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java

Modified: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java?rev=1082663&r1=1082662&r2=1082663&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java (original)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java Thu Mar 17 19:47:10 2011
@@ -26,6 +26,8 @@ import java.util.List;
 import java.util.Map;
 
 import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.ContextCallback;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIComponentBase;
 import javax.faces.context.FacesContext;
@@ -40,7 +42,6 @@ import org.apache.myfaces.buildtools.mav
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
 import org.apache.myfaces.shared_tomahawk.component.BindingAware;
 import org.apache.myfaces.shared_tomahawk.util.RestoreStateUtils;
-import org.apache.myfaces.shared_tomahawk.util._ComponentUtils;
 
 /**
  * The aliasBean tag allows you to create a temporary name for a real bean.
@@ -378,4 +379,20 @@ public class AliasBean extends UICompone
 
         removeAlias(getFacesContext());
     }
+
+    @Override
+    public boolean invokeOnComponent(FacesContext context, String clientId,
+            ContextCallback callback) throws FacesException
+    {
+        makeAlias(getFacesContext());
+        try
+        {
+            return super.invokeOnComponent(context, clientId, callback);
+        }
+        finally
+        {
+            removeAlias(getFacesContext());
+        }
+    }
+
 }

Modified: myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java?rev=1082663&r1=1082662&r2=1082663&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java (original)
+++ myfaces/tomahawk/trunk/core12/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java Thu Mar 17 19:47:10 2011
@@ -18,13 +18,15 @@
  */
 package org.apache.myfaces.custom.aliasbean;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.io.IOException;
 
+import javax.faces.FacesException;
+import javax.faces.component.ContextCallback;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIComponentBase;
 import javax.faces.context.FacesContext;
@@ -36,8 +38,8 @@ import org.apache.commons.logging.LogFac
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspProperties;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspProperty;
-import org.apache.myfaces.shared_tomahawk.util.RestoreStateUtils;
 import org.apache.myfaces.shared_tomahawk.component.BindingAware;
+import org.apache.myfaces.shared_tomahawk.util.RestoreStateUtils;
 
 /**
  * Holds several aliases that are configured by aliasBean tags.
@@ -289,4 +291,20 @@ public class AliasBeansScope extends UIC
 
         removeAliases(getFacesContext());
     }
+
+    @Override
+    public boolean invokeOnComponent(FacesContext context, String clientId,
+            ContextCallback callback) throws FacesException
+    {
+        makeAliases(getFacesContext());
+        try
+        {
+            return super.invokeOnComponent(context, clientId, callback);
+        }
+        finally
+        {
+            removeAliases(getFacesContext());
+        }
+    }
+
 }