You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2011/07/23 18:58:22 UTC
svn commit: r1150154 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
Author: hlship
Date: Sat Jul 23 16:58:21 2011
New Revision: 1150154
URL: http://svn.apache.org/viewvc?rev=1150154&view=rev
Log:
TAP5-1508: Fix TransformationSupportImpl to record the added event type into the model
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java?rev=1150154&r1=1150153&r2=1150154&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java Sat Jul 23 16:58:21 2011
@@ -314,7 +314,7 @@ public final class ComponentInstantiator
final MutableComponentModel model = new MutableComponentModelImpl(className, logger, baseResource,
parentModel, isPage);
- transformerChain.transform(plasticClass, new TransformationSupportImpl(plasticClass, isRoot), model);
+ transformerChain.transform(plasticClass, new TransformationSupportImpl(plasticClass, isRoot, model), model);
classToModel.put(className, model);
}
@@ -379,10 +379,13 @@ public final class ComponentInstantiator
private final boolean root;
- public TransformationSupportImpl(PlasticClass plasticClass, boolean root)
+ private final MutableComponentModel model;
+
+ public TransformationSupportImpl(PlasticClass plasticClass, boolean root, MutableComponentModel model)
{
this.plasticClass = plasticClass;
this.root = root;
+ this.model = model;
}
public Class toClass(String typeName)
@@ -409,6 +412,8 @@ public final class ComponentInstantiator
assert minContextValues >= 0;
assert handler != null;
+ model.addEventHandler(eventType);
+
MethodAdvice advice = new MethodAdvice()
{
public void advise(MethodInvocation invocation)