Re: Plastic: access to the method visitor

2014-02-20 Thread Philip Aston
Having created a test case, I found what I was doing wrong. I was expecting PlasticField.createAccessors() to understand covariant return types, and so "pc.introduceField(Foo.class).createAccessors(..)" would override "Object getFoo()"; it doesn't. I now have everything working without the need fo

Re: Tapestry with Jetty behind https frontend

2014-02-20 Thread Kristian Marinkovic
hi all, going through the posts i realized there is an easier solution missing. What i do is to contribute a HttpServletRequestHandler that checks for the X-Forwarded-Proto header and - in case its set - wraps the HttpServletRequest with overrides to isSecure(), getScheme() and getServerPort(). A

Re: Plastic: access to the method visitor

2014-02-20 Thread Thiago H de Paula Figueiredo
I'd also add the Tapestry-IoC classes that create service proxies. On Thu, 20 Feb 2014 11:03:09 -0300, Lance Java wrote: Possibly the most comprehensive use of plastic is the test cases https://github.com/apache/tapestry-5/tree/master/plastic/src/test/groovy/org/apache/tapestry5/plastic Af

Re: Plastic: access to the method visitor

2014-02-20 Thread Lance Java
Possibly the most comprehensive use of plastic is the test cases https://github.com/apache/tapestry-5/tree/master/plastic/src/test/groovy/org/apache/tapestry5/plastic After that, it's worth checking out Taha's blog http://tawus.wordpress.com/category/plastic/

Re: Plastic: access to the method visitor

2014-02-20 Thread Lance Java
Perhaps give a high level overview of what you're trying to achieve. Can it be achieved using: PlasticClass.introduceMethod(...) and PlasticMethod.addAdvice(MethodAdvice)

Re: 5.4 javascript events

2014-02-20 Thread Nathan Quirynen
Thanks, just what I needed :) On 20/02/14 14:00, Dragan Sahpaski wrote: On Thu, Feb 20, 2014 at 1:59 PM, Dragan Sahpaski wrote: You need to requre the events module and listen to events.zone.update or without the events module dependency just

Re: 5.4 javascript events

2014-02-20 Thread Dragan Sahpaski
On Thu, Feb 20, 2014 at 1:59 PM, Dragan Sahpaski wrote: > You need to requre the events module and listen to events.zone.update or > without the events module dependency just "t5:zone:update". > The global Tapestry namespace (from 5.3) is replaced various with requrejs > modules. > ​I meant the g

Re: 5.4 javascript events

2014-02-20 Thread Dragan Sahpaski
You need to requre the events module and listen to events.zone.update or without the events module dependency just "t5:zone:update". The global Tapestry namespace (from 5.3) is replaced various with requrejs modules. Excerpt from events.js zone: { update: "t5:zone:update", willUpdate:

5.4 javascript events

2014-02-20 Thread Nathan Quirynen
Hey, In my Tapestry 5.3.7 application I made use of Tapestry.ZONE_UPDATED_EVENT to fire some javascript on a zone update. Now I'm using Tapestry 5.4-beta-3 in a new application, but I cannot get it to work. Is this supposed to still work, or is there a new way of handling this? $("#zoneTest").bin

Re: Plastic: access to the method visitor

2014-02-20 Thread Thiago H de Paula Figueiredo
On Thu, 20 Feb 2014 09:10:45 -0300, Philip Aston wrote: I'll work one up. I couldn't implement existing interface methods either. Tapestry-IoC does an awful lot of that (creating classes to implement an interface) when creating proxies to services defined by an interface. Yeah, I think t

Re: Plastic: access to the method visitor

2014-02-20 Thread Philip Aston
On 20/02/14 12:08, Thiago H de Paula Figueiredo wrote: > On Thu, 20 Feb 2014 08:11:35 -0300, Philip Aston > wrote: > >> Well, the InstructionBuilder API requires you to understand the byte >> code that's generated. Also, I agree that it is sane to transform >> existing classes, and I originally tr

Re: Plastic: access to the method visitor

2014-02-20 Thread Thiago H de Paula Figueiredo
On Thu, 20 Feb 2014 08:11:35 -0300, Philip Aston wrote: Well, the InstructionBuilder API requires you to understand the byte code that's generated. Also, I agree that it is sane to transform existing classes, and I originally tried to do so but found Plastic didn't let me implement abstract met

Re: Plastic: access to the method visitor

2014-02-20 Thread Philip Aston
On 20/02/14 08:30, Lance Java wrote: > I think the whole philosophy of Plastic is that you shouldn't ever need to > use ASM directly. I'm no expert but my understanding is that you can write > normal java code by implementing interfaces and use Plastic to weave the > implementations into the byte c

Re: Executing JS function from component ONCE

2014-02-20 Thread lacko
Hi! I'm not sure if I used your proposal correctly, nevertheless "best" result was following (which leads me again to wrong workflow idea of non existing body element): Uncaught TypeError: Cannot call method 'observe' of undefined What is working for me is jQuery with 10 years old java

Re: Plastic: access to the method visitor

2014-02-20 Thread Lance Java
I think the whole philosophy of Plastic is that you shouldn't ever need to use ASM directly. I'm no expert but my understanding is that you can write normal java code by implementing interfaces and use Plastic to weave the implementations into the byte code.