Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-15 Thread Josh Canfield
Yes, the problem is that you are advising every advisable page/component/service in the system. This includes base classes; when you've already advised the base class then the interface won't be added and therefore the method won't exist in the transformation. Try only adding the interface to clas

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Markus Feindler
I always get IndexOutofBounds (methods.size == 0), though name is equal (I logged that). Is there a bug in the matchMethods Impl? Right... coding in email so I missed the different type signature. Apparently findMethods has been deprecated in favor of List matchMethods(Predicate predicate) Fi

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Josh Canfield
Right... coding in email so I missed the different type signature. Apparently findMethods has been deprecated in favor of List matchMethods(Predicate predicate) Finds all methods matched by the provided predicate. Which returns the TransformMethod which you want to add advice. Your predicate woul

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Markus Feindler
Sounds plausible, but how would a MethodFilter help? It can retrieve the TransformMethodSignature, but how to use that to create an advise? Hmm... just took a look at the code again and I think I see the problem. / This creates the method body if your class doesn't already implement it: tra

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Josh Canfield
Hmm... just took a look at the code again and I think I see the problem. / This creates the method body if your class doesn't already implement it: transformation.addImplementedInterface(RequestParameterExtractor.class); TransformMethodSignature extractMethod = new TransformMethodSignature(Mo

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Markus Feindler
@Christoph: Same Error @Josh Yes, I also removed the Generic Map from the Interface. Just checked in debug method: the method indeed already exists (breakpoint: line 1443 InternalClassTransformationImpl). But how come? Its never added through my code. Did you take the type parameters off of

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Josh Canfield
Did you take the type parameters off of the interface too (return a raw map)? Have you looked at with a debugger? Stick a breakpoint right before the exception and take a look at the methods in the ctclass. I can't look at it now but I'll try to reproduce the problem tonight. Josh On Tue, Sep 1

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Christophe Cordenier
Same error ? 2010/9/14 Markus Feindler > Just tried, does not work :(. > > Have you tried without specify Generic types ? >> >> 2010/9/13 Christophe Cordenier >> >> Oh, this is maybe due to generics... >>> >>> 2010/9/13 Markus Feindler >>> >>> public interface RequestParameterExtractor {

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Markus Feindler
Just tried, does not work :(. Have you tried without specify Generic types ? 2010/9/13 Christophe Cordenier Oh, this is maybe due to generics... 2010/9/13 Markus Feindler public interface RequestParameterExtractor { Map extractRequestParameters(); } is not equal to: Transform

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-14 Thread Markus Feindler
Will try that later and inform you. > > Original-Nachricht > Datum: Tue, 14 Sep 2010 08:17:57 +0200 > Von: Christophe Cordenier > An: Tapestry users > Betreff: Re: Retrieve ActivationRequestParameters in custom > PageResponseRenderer >

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-13 Thread Christophe Cordenier
Have you tried without specify Generic types ? 2010/9/13 Christophe Cordenier > Oh, this is maybe due to generics... > > 2010/9/13 Markus Feindler > >> >> >> public interface RequestParameterExtractor { >>Map extractRequestParameters(); >> } >> >> is not equal to: >> >> >> TransformMeth

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-13 Thread Christophe Cordenier
Oh, this is maybe due to generics... 2010/9/13 Markus Feindler > > > public interface RequestParameterExtractor { >Map extractRequestParameters(); > } > > is not equal to: > > > TransformMethodSignature extractMethod = new > TransformMethodSignature(Modifier.PUBLIC, >"Map", "

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-13 Thread Markus Feindler
public interface RequestParameterExtractor { Map extractRequestParameters(); } is not equal to: TransformMethodSignature extractMethod = new TransformMethodSignature(Modifier.PUBLIC, "Map", "extractRequestParameters", null, null); ? Everything looks good ... The only

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-13 Thread Christophe Cordenier
Everything looks good ... The only thing i see is that the method signature is not exactly the same as the one declared in the interface. 2010/9/13 Markus Feindler > Am 13.09.2010 22:18, schrieb Thiago H. de Paula Figueiredo: > > On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier < >> ch

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-13 Thread Markus Feindler
Am 13.09.2010 22:18, schrieb Thiago H. de Paula Figueiredo: On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier wrote: Please, Can you provide your Tapestry Module class that contributes your worker ? And the worker itself? It seems two different worker instances are trying to add th

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-13 Thread Thiago H. de Paula Figueiredo
On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier wrote: Please, Can you provide your Tapestry Module class that contributes your worker ? And the worker itself? It seems two different worker instances are trying to add the same method to the same page class. -- Thiago H. de Paul

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-13 Thread Christophe Cordenier
2010 08:26:05 +0200 > > Von: Christophe Cordenier > > An: Tapestry users > > Betreff: Re: Retrieve ActivationRequestParameters in custom > > PageResponseRenderer > > > > Weird, does you Index page extends a base class ? > > > > 20

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-13 Thread Markus Feindler
Any ideas? Howard? No, I get the exception for all pages, also the ExpcetionReportPage for example. Original-Nachricht Datum: Thu, 9 Sep 2010 08:26:05 +0200 Von: Christophe Cordenier An: Tapestry users Betreff: Re: Retrieve ActivationRequestParameters in custom

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-09 Thread Markus Feindler
No, I get the exception for all pages, also the ExpcetionReportPage for example. > > Original-Nachricht > Datum: Thu, 9 Sep 2010 08:26:05 +0200 > Von: Christophe Cordenier > An: Tapestry users > Betreff: Re: Retrieve ActivationRequestPa

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-08 Thread Christophe Cordenier
Weird, does you Index page extends a base class ? 2010/9/8 Markus Feindler > Sorry to bother you, but Im stuck with a DuplicateMemberException: > Caused by: java.lang.RuntimeException: > javassist.bytecode.DuplicateMemberException: duplicate method: > extractRequestParameters in de.wiv.tapestry

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-08 Thread Markus Feindler
Sorry to bother you, but Im stuck with a DuplicateMemberException: Caused by: java.lang.RuntimeException: javassist.bytecode.DuplicateMemberException: duplicate method: extractRequestParameters in de.wiv.tapestryportlet2.pages.Index at org.apache.tapestry5.internal.services.InternalClassTr

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-07 Thread Christophe Cordenier
Hi ! Tapestry 5.2 has a brand new API for class manipulation in worker, you have to provide the method signature and implement the logic in a ComponentMethodAdvice (see PropertyWorker sources to have a simple example) HTH 2010/9/7 Markus Feindler > So, I tried to follow your advice, but I don

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-07 Thread Markus Feindler
So, I tried to follow your advice, but I don't see how to add a new method after calling "transformation.addImplementedInterface(MyInterface.class)". The documentation states to use transformation.getOrCreateMethod, but where to define the message body? Actually, I would implement a ClassTra

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-06 Thread Christophe Cordenier
Actually, I would implement a ClassTransformation and add it to contributeComponentClassTransformWorker (see Tapestry Module), This worker should add and implement an interface that contains the method to extract useful information from the page Then in your PageResponseRenderer, you can use Comp

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-06 Thread Markus Feindler
Thats the class I discovered earlier at work. Now my question is how to get ClassTransformation and MutableComponentModel from the Page Object in the PageResponseRenderer? Thanks for you help/hints. Regards markus Hi Logic is enclosed in ActivationRequestParameterWorker, i think you can ad

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-06 Thread Thiago H. de Paula Figueiredo
On Mon, 06 Sep 2010 15:21:37 -0300, Christophe Cordenier wrote: Actually, not exactly, it uses an event handler to read values and add them in the current link. Thanks for the correction. :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, dev

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-06 Thread Christophe Cordenier
Actually, not exactly, it uses an event handler to read values and add them in the current link. 2010/9/6 Thiago H. de Paula Figueiredo > On Mon, 06 Sep 2010 15:01:09 -0300, Christophe Cordenier < > christophe.corden...@gmail.com> wrote: > > Hi >> > > Hi! > > Logic is enclosed in ActivationReq

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-06 Thread Thiago H. de Paula Figueiredo
On Mon, 06 Sep 2010 15:01:09 -0300, Christophe Cordenier wrote: Hi Hi! Logic is enclosed in ActivationRequestParameterWorker, i think you can adapt this to your needs and extract values. At the moment, I don't see any other way to identify ActivationRequestParameters during link crea

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-06 Thread Christophe Cordenier
Hi Logic is enclosed in ActivationRequestParameterWorker, i think you can adapt this to your needs and extract values. At the moment, I don't see any other way to identify ActivationRequestParameters during link creation. 2010/9/6 Markus Feindler > >> i would say you can get them from >> Reque

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-06 Thread Markus Feindler
i would say you can get them from Request directly This only works for the current request. I need to get the parameters, which will be set for the next request/redirect. It would be possible to write get methods for the ActivationRequestParameters, but that would not be the right way. I nee

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-06 Thread Christophe Cordenier
Oh sorry, i had mis-read your first message. I didn't get deep into this new feature at the time, but at first glance, i would say you can get them from Request directly. Maybe, you can implement a worker that will be in charge of implementing an interface that will contain the method that return t

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-05 Thread Markus Feindler
Thats what Im doing right now for the PageActivationContext, but I also need the values for the ActivationRequestParameters (introduced in 5.2: http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/annotations/ActivationRequestParameter.html). Hi So why not passivate the page,

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-05 Thread Christophe Cordenier
Hi So why not passivate the page, see PageActivationContextCollector ? This is how it works to create links. 2010/9/5 Markus Feindler > No, Im trying to upgrade "my" portlet implementation from 5.1 to 5.2 and > up to now the activationrequestparameters aren't put in the url, cause I > have to

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-05 Thread Markus Feindler
No, Im trying to upgrade "my" portlet implementation from 5.1 to 5.2 and up to now the activationrequestparameters aren't put in the url, cause I have to adjust my former 5.1 custom response renderer. If the Request is an ActionRequest (see Portlet lifecycle) you can't write output into a stre

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-05 Thread Josh Canfield
That's not enough details. -- Josh On Sep 5, 2010, at 9:51 AM, Markus Feindler wrote: > Need it for portlet implementation. >> Hi >> >> What is the purpose ? I guess you are dealing with some kind of dynamic >> stuff, please can you give more details ? >> >> 2010/9/5 Markus Feindler >> >>>

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-05 Thread Christophe Cordenier
Just curious, you try to include a portlet in a Tapestry page ? 2010/9/5 Markus Feindler > Need it for portlet implementation. > > Hi >> >> What is the purpose ? I guess you are dealing with some kind of dynamic >> stuff, please can you give more details ? >> >> 2010/9/5 Markus Feindler >> >>

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-05 Thread Christophe Cordenier
I don't know if it suits to your case, but you could use ComponentEventLinkEncoder to decode the request path... This will return you an object from which you can extract activation context values. Hope that helps 2010/9/5 Markus Feindler > Need it for portlet implementation. > > Hi >> >> Wha

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-05 Thread Markus Feindler
Need it for portlet implementation. Hi What is the purpose ? I guess you are dealing with some kind of dynamic stuff, please can you give more details ? 2010/9/5 Markus Feindler Hey folks, I need to access page field values annotated with ActivationRequestParameters in order to retrieve t

Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer

2010-09-05 Thread Christophe Cordenier
Hi What is the purpose ? I guess you are dealing with some kind of dynamic stuff, please can you give more details ? 2010/9/5 Markus Feindler > Hey folks, > > I need to access page field values annotated with > ActivationRequestParameters in order to retrieve the values. Reflection > doesnt wo