On Fri, Apr 20, 2012 at 9:39 AM, Luke Wilson <l...@viscri.co.uk> wrote:
> Hi,
>
> The behaviour of the now deprecated ClassTransformation.matchMethods() and 
> related methods has changed to not include introduced Methods.  I believe 
> this problem also applies to fields.
>
> On top of this, the built in ClassTransformationWorker2s use 
> PlasticClass.getMethods() directly to find fields.
>
> The sum total of this is that it is impossible to create a method or field in 
> a ClassTransformationWorker/ClassTransformationWorker2 and have it taken into 
> account by subsequent workers. Is this deliberate, or is it a bug? It's 
> causing us headaches in our upgrade to Tapestry 5.3.

I think that's a use case that isn't accounted for. The other APIs on
ClassTransformationWorker2,  particularly TransformationSupport, are
intended to fill the gap.

My observation was that you would introduce a method to either add an
event handler method, which can be done using TransformationSupport,
or to introduce rendering behavior, which can be accomplished by
advising one of the render phase methods.

However, I'm interested in other use cases, and will certainly address
them if they are valid.

Sorry for your upgrade trouble; I'd have to say you are likely in the
minority, using the most advanced features of Tapestry (and,
unfortunately, paying the cost).

That being said, I hope you are enjoying the Plastic API more than its
various predecessors.

>
> More is described here: 
> http://stackoverflow.com/questions/10249254/tapestry-5-3-plasticclass-getmethods-doesnt-include-introduced-methods.
>

Ah, yes, I can see what you are going there.

I think, perhaps, PlasticField and PlasticMethod may need a
makeVisible() method that makes the introduced members visible inside
PlasticClass.getMethods() and PlasticClass.getFields().  I don't think
there's a way to extricate things so that member access within the
introduced method is not transformed, but that's probably fine ... in
your case, you want to make sure that the ParameterWorker sees your
defaultValidate() method, and that method will be a stub with advice.


> Kind regards,
>
> Luke
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to