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 2010/07/15 08:17:19 UTC
svn commit: r964310 - in
/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets: ./
impl/ tag/composite/ tag/jsf/ tag/jsf/core/
Author: lu4242
Date: Thu Jul 15 06:17:19 2010
New Revision: 964310
URL: http://svn.apache.org/viewvc?rev=964310&view=rev
Log:
MYFACES-2802 Remove CompositeComponentResourceTagHandler.ATTACHED_OBJECT_HADLERS_KEY from Attributes Map (thanks to Marius Petoi for provide this patch)
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletCompositionContext.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ActionListenerHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/AjaxHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValueChangeListenerHandler.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletCompositionContext.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletCompositionContext.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletCompositionContext.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletCompositionContext.java Thu Jul 15 06:17:19 2010
@@ -19,10 +19,12 @@
package org.apache.myfaces.view.facelets;
import java.util.Iterator;
+import java.util.List;
import javax.faces.component.UIComponent;
import javax.faces.component.UniqueIdVendor;
import javax.faces.context.FacesContext;
+import javax.faces.view.AttachedObjectHandler;
import javax.faces.view.facelets.FaceletContext;
/**
@@ -230,5 +232,31 @@ abstract public class FaceletComposition
public abstract boolean isUsingPSSOnThisView();
public abstract boolean isMarkInitialStateAndIsRefreshTransientBuildOnPSS();
+
+ /**
+ * Add to the composite component parent this handler, so it will be processed later when
+ * ViewDeclarationLanguage.retargetAttachedObjects is called.
+ *
+ * Tag Handlers exposing attached objects should call this method to expose them when the
+ * parent to be applied is a composite components.
+ *
+ * @param compositeComponentParent
+ * @param handler
+ */
+ public abstract void addAttachedObjectHandler(UIComponent compositeComponentParent, AttachedObjectHandler handler);
+
+ /**
+ * Remove from the composite component parent the list of attached handlers.
+ *
+ * @param compositeComponentParent
+ */
+ public abstract void removeAttachedObjectHandlers(UIComponent compositeComponentParent);
+
+ /**
+ * Retrieve the list of object handlers attached to a composite component parent.
+ *
+ * @param compositeComponentParent
+ */
+ public abstract List<AttachedObjectHandler> getAttachedObjectHandlers(UIComponent compositeComponentParent);
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java Thu Jul 15 06:17:19 2010
@@ -105,7 +105,6 @@ import org.apache.myfaces.view.facelets.
import org.apache.myfaces.view.facelets.tag.composite.ClientBehaviorAttachedObjectTarget;
import org.apache.myfaces.view.facelets.tag.composite.ClientBehaviorRedirectBehaviorAttachedObjectHandlerWrapper;
import org.apache.myfaces.view.facelets.tag.composite.ClientBehaviorRedirectEventComponentWrapper;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler;
import org.apache.myfaces.view.facelets.tag.composite.CompositeLibrary;
import org.apache.myfaces.view.facelets.tag.composite.CompositeResourceLibrary;
import org.apache.myfaces.view.facelets.tag.jsf.core.AjaxHandler;
@@ -643,6 +642,8 @@ public class FaceletViewDeclarationLangu
for (AttachedObjectTarget currentTarget : targetList)
{
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance();
+
if ( ( forValue != null && forValue.equals(currentTarget.getName()) ) &&
((currentTarget instanceof ActionSource2AttachedObjectTarget &&
currentHandler instanceof ActionSource2AttachedObjectHandler) ||
@@ -671,10 +672,9 @@ public class FaceletViewDeclarationLangu
// The current handler should be added to the list, to be chained.
// Note that the inner component should have a target with the same name
// as "for" attribute
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(component, currentHandler);
+ mctx.addAttachedObjectHandler(component, currentHandler);
- List<AttachedObjectHandler> handlers = (List<AttachedObjectHandler>)
- component.getAttributes().get(CompositeComponentResourceTagHandler.ATTACHED_OBJECT_HANDLERS_KEY);
+ List<AttachedObjectHandler> handlers = mctx.getAttachedObjectHandlers(component);
retargetAttachedObjects(context, component, handlers);
}
@@ -703,18 +703,17 @@ public class FaceletViewDeclarationLangu
{
if (currentTarget instanceof ClientBehaviorAttachedObjectTarget)
{
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(component,
+ mctx.addAttachedObjectHandler(component,
new ClientBehaviorRedirectBehaviorAttachedObjectHandlerWrapper(
(BehaviorHolderAttachedObjectHandler) currentHandler,
((ClientBehaviorAttachedObjectTarget) currentTarget).getEvent()));
}
else
{
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(component, currentHandler);
+ mctx.addAttachedObjectHandler(component, currentHandler);
}
- List<AttachedObjectHandler> handlers = (List<AttachedObjectHandler>)
- component.getAttributes().get(CompositeComponentResourceTagHandler.ATTACHED_OBJECT_HANDLERS_KEY);
+ List<AttachedObjectHandler> handlers = mctx.getAttachedObjectHandlers(component);
retargetAttachedObjects(context, component, handlers);
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java Thu Jul 15 06:17:19 2010
@@ -18,12 +18,17 @@
*/
package org.apache.myfaces.view.facelets.impl;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
import javax.faces.component.UIComponent;
import javax.faces.component.UniqueIdVendor;
import javax.faces.context.FacesContext;
+import javax.faces.view.AttachedObjectHandler;
import org.apache.myfaces.view.facelets.FaceletCompositionContext;
import org.apache.myfaces.view.facelets.FaceletFactory;
@@ -58,12 +63,14 @@ public class FaceletCompositionContextIm
private Boolean _usingPSSOnThisView;
+ private final Map<UIComponent, List<AttachedObjectHandler>> _attachedObjectHandlers;
public FaceletCompositionContextImpl(FaceletFactory factory, FacesContext facesContext)
{
super();
_factory = factory;
_facesContext = facesContext;
+ _attachedObjectHandlers = new HashMap<UIComponent, List<AttachedObjectHandler>>();
}
public FaceletFactory getFaceletFactory()
@@ -322,4 +329,30 @@ public class FaceletCompositionContextIm
{
return isMarkInitialState() && isRefreshTransientBuildOnPSS();
}
+
+ @Override
+ public void addAttachedObjectHandler(UIComponent compositeComponentParent, AttachedObjectHandler handler)
+ {
+ List<AttachedObjectHandler> list = _attachedObjectHandlers.get(compositeComponentParent);
+
+ if (list == null)
+ {
+ list = new ArrayList<AttachedObjectHandler>();
+ _attachedObjectHandlers.put(compositeComponentParent, list);
+ }
+
+ list.add(handler);
+ }
+
+ @Override
+ public void removeAttachedObjectHandlers(UIComponent compositeComponentParent)
+ {
+ _attachedObjectHandlers.remove(compositeComponentParent);
+ }
+
+ @Override
+ public List<AttachedObjectHandler> getAttachedObjectHandlers(UIComponent compositeComponentParent)
+ {
+ return _attachedObjectHandlers.get(compositeComponentParent);
+ }
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentResourceTagHandler.java Thu Jul 15 06:17:19 2010
@@ -22,7 +22,6 @@ import java.beans.BeanDescriptor;
import java.beans.BeanInfo;
import java.beans.PropertyDescriptor;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@@ -81,17 +80,6 @@ import org.apache.myfaces.view.facelets.
public class CompositeComponentResourceTagHandler extends ComponentHandler
implements ComponentBuilderHandler, TemplateClient
{
- /**
- * This key is used to keep the list of AttachedObjectHandlers
- * created when a composite component is created. Tag handlers
- * exposing attached objects should call
- * addAttachedObjectHandler(UIComponent, AttachedObjectHandler)
- * that uses this key to save this list on component attribute
- * map.
- */
- public final static String ATTACHED_OBJECT_HANDLERS_KEY =
- "org.apache.myfaces.ATTACHED_OBJECT_HANDLERS_KEY";
-
private final Resource _resource;
private Metadata _mapper;
@@ -173,18 +161,16 @@ public class CompositeComponentResourceT
ViewDeclarationLanguage vdl = facesContext.getApplication().getViewHandler().
getViewDeclarationLanguage(facesContext, facesContext.getViewRoot().getViewId());
-
- List<AttachedObjectHandler> handlers = (List<AttachedObjectHandler>)
- c.getAttributes().get(ATTACHED_OBJECT_HANDLERS_KEY);
+
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
+ List<AttachedObjectHandler> handlers = mctx.getAttachedObjectHandlers(c);
if (handlers != null)
{
vdl.retargetAttachedObjects(facesContext, c, handlers);
- // Since handlers list is not serializable and it is not necessary to
- // keep them anymore on attribute map, it is better to remove it from
- // component attribute map
- c.getAttributes().remove(ATTACHED_OBJECT_HANDLERS_KEY);
+ // remove the list of handlers, as it is no longer necessary
+ mctx.removeAttachedObjectHandlers(c);
}
vdl.retargetMethodExpressions(facesContext, c);
@@ -323,7 +309,7 @@ public class CompositeComponentResourceT
{
while(it.hasNext())
{
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(
+ mctx.addAttachedObjectHandler(
compositeComponentBase, it.next());
}
}
@@ -341,32 +327,6 @@ public class CompositeComponentResourceT
faceletContext.setVariableMapper(orig);
}
}
-
- /**
- * Add to the composite component parent this handler, so it will be processed later when
- * ViewDeclarationLanguage.retargetAttachedObjects is called (see applyNextHandler method).
- *
- * Tag Handlers exposing attached objects should call this method to expose them when the
- * parent to be applied is a composite components.
- *
- * @param compositeComponentParent
- * @param handler
- */
- @SuppressWarnings("unchecked")
- public static void addAttachedObjectHandler(UIComponent compositeComponentParent, AttachedObjectHandler handler)
- {
- List<AttachedObjectHandler> list = (List<AttachedObjectHandler>)
- compositeComponentParent.getAttributes().get(
- ATTACHED_OBJECT_HANDLERS_KEY);
-
- if (list == null)
- {
- list = new ArrayList<AttachedObjectHandler>();
- compositeComponentParent.getAttributes().put(ATTACHED_OBJECT_HANDLERS_KEY, list);
- }
-
- list.add(handler);
- }
@Override
public void setAttributes(FaceletContext ctx, Object instance)
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java Thu Jul 15 06:17:19 2010
@@ -36,8 +36,8 @@ import javax.faces.view.facelets.TagAttr
import javax.faces.view.facelets.TagException;
import javax.faces.view.facelets.TagHandlerDelegate;
+import org.apache.myfaces.view.facelets.FaceletCompositionContext;
import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler;
import org.apache.myfaces.view.facelets.tag.jsf.core.AjaxHandler;
/**
@@ -72,6 +72,7 @@ public class BehaviorTagHandlerDelegate
}
else if (UIComponent.isCompositeComponent(parent))
{
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
// It is supposed that for composite components, this tag should
// add itself as a target, but note that on whole api does not exists
// some tag that expose client behaviors as targets for composite
@@ -80,7 +81,7 @@ public class BehaviorTagHandlerDelegate
// understand as an implementation detail, after all there exists a key
// called AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY that could be
// used to create a tag outside jsf implementation to attach targets.
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, _delegate);
+ mctx.addAttachedObjectHandler(parent, _delegate);
}
else
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java Thu Jul 15 06:17:19 2010
@@ -34,8 +34,8 @@ import javax.faces.view.facelets.TagAttr
import javax.faces.view.facelets.TagException;
import javax.faces.view.facelets.TagHandlerDelegate;
+import org.apache.myfaces.view.facelets.FaceletCompositionContext;
import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler;
/**
* Handles setting a Converter instance on a ValueHolder. Will wire all attributes set to the Converter instance
@@ -92,7 +92,8 @@ public class ConverterTagHandlerDelegate
throw new TagException(_delegate.getTag(), "is nested inside a composite component"
+ " but does not have a for attribute.");
}
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, _delegate);
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
+ mctx.addAttachedObjectHandler(parent, _delegate);
}
else
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java Thu Jul 15 06:17:19 2010
@@ -41,7 +41,6 @@ import org.apache.myfaces.shared_impl.re
import org.apache.myfaces.view.facelets.FaceletCompositionContext;
import org.apache.myfaces.view.facelets.compiler.FaceletsCompilerUtils;
import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler;
/**
* Handles setting a Validator instance on a EditableValueHolder. Will wire all attributes set to the Validator instance
@@ -93,6 +92,10 @@ public class ValidatorTagHandlerDelegate
{
return;
}
+
+ // we need methods from AbstractFaceletContext
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
+
if (_wrapMode)
{
// the tag has children --> provide validator information for all children
@@ -110,9 +113,6 @@ public class ValidatorTagHandlerDelegate
// attach the validator to the second h:inputText in this scenario (blackbox test).
// So I use the same way as f:ajax for this problem. -=Jakob Korherr=-
- // we need methods from AbstractFaceletContext
- FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
-
String validatorId = _delegate.getValidatorConfig().getValidatorId();
boolean disabled = _delegate.isDisabled(ctx);
@@ -165,7 +165,7 @@ public class ValidatorTagHandlerDelegate
throw new TagException(_delegate.getTag(), "is nested inside a composite component"
+ " but does not have a for attribute.");
}
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, _delegate);
+ mctx.addAttachedObjectHandler(parent, _delegate);
}
else
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ActionListenerHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ActionListenerHandler.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ActionListenerHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ActionListenerHandler.java Thu Jul 15 06:17:19 2010
@@ -43,7 +43,7 @@ import javax.faces.view.facelets.TagHand
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletAttribute;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTag;
import org.apache.myfaces.shared_impl.renderkit.JSFAttr;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler;
+import org.apache.myfaces.view.facelets.FaceletCompositionContext;
import org.apache.myfaces.view.facelets.util.ReflectionUtil;
/**
@@ -174,7 +174,8 @@ public final class ActionListenerHandler
throw new TagException(tag, "is nested inside a composite component"
+ " but does not have a for attribute.");
}
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, this);
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
+ mctx.addAttachedObjectHandler(parent, this);
}
else
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/AjaxHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/AjaxHandler.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/AjaxHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/AjaxHandler.java Thu Jul 15 06:17:19 2010
@@ -51,7 +51,6 @@ import org.apache.myfaces.shared_impl.re
import org.apache.myfaces.view.facelets.AbstractFaceletContext;
import org.apache.myfaces.view.facelets.FaceletCompositionContext;
import org.apache.myfaces.view.facelets.tag.TagHandlerUtils;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler;
import org.apache.myfaces.view.facelets.tag.composite.InsertChildrenHandler;
import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
import org.apache.myfaces.view.facelets.tag.ui.DecorateHandler;
@@ -210,6 +209,7 @@ public class AjaxHandler extends TagHand
}
else if (UIComponent.isCompositeComponent(parent))
{
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
// It is supposed that for composite components, this tag should
// add itself as a target, but note that on whole api does not exists
// some tag that expose client behaviors as targets for composite
@@ -218,7 +218,7 @@ public class AjaxHandler extends TagHand
// understand as an implementation detail, after all there exists a key
// called AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY that could be
// used to create a tag outside jsf implementation to attach targets.
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(
+ mctx.addAttachedObjectHandler(
parent, this);
}
else
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/SetPropertyActionListenerHandler.java Thu Jul 15 06:17:19 2010
@@ -42,7 +42,7 @@ import javax.faces.view.facelets.TagHand
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletAttribute;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTag;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler;
+import org.apache.myfaces.view.facelets.FaceletCompositionContext;
@JSFFaceletTag(
name = "f:setPropertyActionListener",
@@ -75,7 +75,8 @@ public class SetPropertyActionListenerHa
}
else if (UIComponent.isCompositeComponent(parent))
{
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, this);
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
+ mctx.addAttachedObjectHandler(parent, this);
}
else
{
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValueChangeListenerHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValueChangeListenerHandler.java?rev=964310&r1=964309&r2=964310&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValueChangeListenerHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValueChangeListenerHandler.java Thu Jul 15 06:17:19 2010
@@ -42,7 +42,7 @@ import javax.faces.view.facelets.TagHand
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletAttribute;
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTag;
-import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler;
+import org.apache.myfaces.view.facelets.FaceletCompositionContext;
import org.apache.myfaces.view.facelets.util.ReflectionUtil;
/**
@@ -163,7 +163,8 @@ public final class ValueChangeListenerHa
}
else if (UIComponent.isCompositeComponent(parent))
{
- CompositeComponentResourceTagHandler.addAttachedObjectHandler(parent, this);
+ FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
+ mctx.addAttachedObjectHandler(parent, this);
}
else
{