Re: accessing core services

2008-04-26 Thread Sven Homburg
@InjectService is possible, if you must inject a service by his ID (if two or more services implement the same interface) 2008/4/26 Chris Lewis <[EMAIL PROTECTED]>: > Janos > > No, @Inject does not work in services. However injection still works on > them, and is done via constructor arguments. Y

Re: accessing core services

2008-04-26 Thread Chris Lewis
Janos No, @Inject does not work in services. However injection still works on them, and is done via constructor arguments. You don't have to instantiate your service, just bind it in your module's bind() method and T5-ioc will sort out the details. To me that seems perfectly sensible and enforces

Re: accessing core services

2008-04-26 Thread János Jarecsni
However, @Inject Logger logger; does not work even now. It is a pity, because this way I have to list all stuff I need in the constructor... I'd rather inject them. Is there some rule in which kind of classes injection works? thx janos 2008/4/26 János Jarecsni <[EMAIL PROTECTED]>: > This helpe

Re: accessing core services

2008-04-26 Thread János Jarecsni
This helped! THX! :) Janos 2008/4/25 Sven Homburg <[EMAIL PROTECTED]>: > i hope it helps you: > > put this code into your ApplicationModule > > public static buildMyDispachter(ComponentClassResolver resolver) > { > return MyDispatcher(resolver); > } > > 2008/4/25, János Jarecsni <[EMAIL PROTECTE

Re: accessing core services

2008-04-25 Thread Chris Lewis
Yeah that looks ok (at a glance). These wikis should help you: http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2 http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess They relate directly to what it seems like yo

Re: accessing core services

2008-04-25 Thread János Jarecsni
Hi, thx for the quick replies first of all, here is how I'm doing it now: public void contributeMasterDispatcher(OrderedConfiguration configuration, @InjectService("MyDispatcher") Dispatcher myDispatcher) { configuration.add("MyDispatcher", myDispatcher, "before:RootPath"

Re: accessing core services

2008-04-25 Thread Sven Homburg
i hope it helps you: put this code into your ApplicationModule public static buildMyDispachter(ComponentClassResolver resolver) { return MyDispatcher(resolver); } 2008/4/25, János Jarecsni <[EMAIL PROTECTED]>: > > Hi, > > sorry for the newbie question again, but what is the canonic or suggeste

Re: accessing core services

2008-04-25 Thread Peter Beshai
You define your dispatcher as a service (with a build method) in your IoC module and pass the services that you need injected into the constructor. See: http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html Peter Beshai On Fri, Apr 25, 2008 at 1:49 PM, János Jarecsni <[EMAIL PROTECTED]

accessing core services

2008-04-25 Thread János Jarecsni
Hi, sorry for the newbie question again, but what is the canonic or suggested way to access core services or facilities of the T5? I mean, from classes, into which nothing gets injected (say, I'm writing a dispatcher, where I'd like to resolve page names, component names). I'd like to have a Compo