You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dan Adams <da...@ifactory.com> on 2006/08/17 00:47:09 UTC
Re: need annotation enhancement help
Okay, so the problem I've got is that my worker is run before the other
workers that add the persistent property. so when the enhancement is
run, i get javassist compile errors because the functions i need don't
exist yet (even though they will later). anyone have any suggestions on
how I can add a persistent property in my annotation worker? is there
some way of having my enhancement actually compiled after or at the same
time as the other enhancement?
one possible solution i thought might work would be to register 2
annotation workers for the same annotation and split up the work but i
don't think that will work.
On Wed, 2006-08-16 at 17:00 -0400, Dan Adams wrote:
> I have an annotation i'm working on (this isn't my first one and i'm
> almost done with this one) where I need to add a persistent property and
> use it in my enhanced code. What's the best way of doing this? I've been
> digging around the T4 sources but haven't been able to find an answer to
> this. So far I have:
>
> String idField = propertyName + "Id";
> IPropertySpecification pspec = new PropertySpecification();
> pspec.setName(idField);
> pspec.setPersistence("session");
> pspec.setLocation(location);
> pspec.setInitialValue(null);
> spec.addPropertySpecification(pspec);
>
> then i get the getter method name with:
> String idGetter = op.getAccessorMethodName(idField);
>
> but at runtime i get the javassist exception "[source error] Method
> setWidgetId not found in ..." Any ideas?
>
--
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: need annotation enhancement help
Posted by Jesse Kuhnert <jk...@gmail.com>.
There's also the secondary enhancement workers ...Maybe in there?
Sounds like one of the existing annotations is going to get in your way
either way, but maybe...
On 8/16/06, Dan Adams <da...@ifactory.com> wrote:
>
> Okay, so the problem I've got is that my worker is run before the other
> workers that add the persistent property. so when the enhancement is
> run, i get javassist compile errors because the functions i need don't
> exist yet (even though they will later). anyone have any suggestions on
> how I can add a persistent property in my annotation worker? is there
> some way of having my enhancement actually compiled after or at the same
> time as the other enhancement?
>
> one possible solution i thought might work would be to register 2
> annotation workers for the same annotation and split up the work but i
> don't think that will work.
>
> On Wed, 2006-08-16 at 17:00 -0400, Dan Adams wrote:
> > I have an annotation i'm working on (this isn't my first one and i'm
> > almost done with this one) where I need to add a persistent property and
> > use it in my enhanced code. What's the best way of doing this? I've been
> > digging around the T4 sources but haven't been able to find an answer to
> > this. So far I have:
> >
> > String idField = propertyName + "Id";
> > IPropertySpecification pspec = new
> PropertySpecification();
> > pspec.setName(idField);
> > pspec.setPersistence("session");
> > pspec.setLocation(location);
> > pspec.setInitialValue(null);
> > spec.addPropertySpecification(pspec);
> >
> > then i get the getter method name with:
> > String idGetter = op.getAccessorMethodName(idField);
> >
> > but at runtime i get the javassist exception "[source error] Method
> > setWidgetId not found in ..." Any ideas?
> >
> --
> Dan Adams
> Senior Software Engineer
> Interactive Factory
> 617.235.5857
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.