Re: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread Filip S. Adamsen
iendliest, Andy. -Original Message- From: Rob Smeets [mailto:[EMAIL PROTECTED] Sent: 14 April 2008 17:10 To: Tapestry users Subject: Re: RequestGlobals in a PersistentFieldStrategy In fact, if I was doing the code again, module classes would not have instance methods, only static methods

Re: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread nicholas Krul
--Original Message- > > From: Rob Smeets [mailto:[EMAIL PROTECTED] > > Sent: 14 April 2008 17:10 > > To: Tapestry users > > Subject: Re: RequestGlobals in a PersistentFieldStrategy > > > > > > In fact, if I was doing the code again, module classes would n

RE: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread Blower, Andy
misery and pain. When are you due to announce it? I've got a great name for you to use, you could call it 'Second Coming'. Yours friendliest, Andy. > -Original Message- > From: Rob Smeets [mailto:[EMAIL PROTECTED] > Sent: 14 April 2008 17:10 > To: Tapestr

Re: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread Rob Smeets
> > > In fact, if I was doing the code again, module classes would not have > instance methods, only static methods. Please, please help. Howard, take your hands off that code, ok. You'll break our current code base. You may do it in Tapestry 6. Because, again that would be it's own beast- as usu

Re: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread Howard Lewis Ship
Have to jump in here; sorry Tomasz, wrong on all counts :-) But thanks for trying to help out. Filip is right, for services you don't use @Inject on fields; you gain access to dependencies via your constructor. Tapestry doesn't manipulate your service classes the way it does components, and @Inj

Re: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread Filip S. Adamsen
What he said! -Filip On 2008-04-14 14:32, Peter Stavrinides wrote: This actually sounds quite interesting! share pls. nicholas Krul wrote: Filip got it for me the method is contributePersistenceStrategry (or something like that - from TapestryModule)... just include the RequestGlobals int

Re: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread Peter Stavrinides
This actually sounds quite interesting! share pls. nicholas Krul wrote: Filip got it for me the method is contributePersistenceStrategry (or something like that - from TapestryModule)... just include the RequestGlobals interface (or Cookies, or whatever) and its taken care of. because its au

Re: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread nicholas Krul
Filip got it for me the method is contributePersistenceStrategry (or something like that - from TapestryModule)... just include the RequestGlobals interface (or Cookies, or whatever) and its taken care of. because its automatically injected into the method signature (no annotation needed), it doe

Re: RequestGlobals in a PersistentFieldStrategy

2008-04-14 Thread Tomasz Dziurko
As fas as I know T5 method build() in AppModule is static, so you need make RequestGlobals static variable: @Inject private static RequestGlobals requestGlobals; to pass it to constructor of mentioned service. When you try to get something (eg HTTPServletRequesst ) from it after calling service y

Re: RequestGlobals in a PersistentFieldStrategy

2008-04-13 Thread Filip S. Adamsen
Hi Nicholas, @Inject doesn't work in services, you'll have to inject RequestGlobals through your service's constructor instead: public CookiePersistentFieldStrategy(RequestGlobals requestGlobals, ...) { this.requestGlobals = requestGlobals; ... } That should work. -Filip On 20

RequestGlobals in a PersistentFieldStrategy

2008-04-12 Thread nicholas Krul
Hi guys. I have implemented a new PersistentFieldStrategy (cookie based), and am having just one problem... @Inject private RequestGlobals requestGlobals isn't processed... and I know of no other way to get it into the strategy to make it work (it is from the base package). I don't care how