And you can see in tacos.sourceforge.net the demo to have a sample.

On 2/9/06, Andrea Chiumenti < [EMAIL PROTECTED]> wrote:
P.s.: singletons are anti IoC


On 2/9/06, Andrea Chiumenti <[EMAIL PROTECTED] > wrote:
even if it shold be better to inject them, since the method is deprecated.
see: http://jakarta.apache.org/tapestry/UsersGuide/injection.html


On 2/9/06, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
I think:

into your page method:

ObjectInterface obj = (ObjectInterface)getEngine().getService("servicename");


On 2/9/06, Christian Mittendorf < [EMAIL PROTECTED]> wrote:
Am 09.02.2006 um 15:09 schrieb Ben Gidley:

I solve for non service classes with a 'RegistryManager' singleton class that holds the register and everything then gets the Registry from there. For tapestry I have overidden the main sevlet so it gets the registry this way rather than constructing its own. 


That's a solution that I want to avoid.

Christian - if you are already in a service you shouldn't need the registry itself. You should be able to inject either via autowiring or via set-service any services you need. 


I'm already inside a service, but inside this Service a Factory is used for returning objects that are necessary for initializing beans. Each of these might require access to different services, therefore a reference to the Registry will help. And I don't want to inject every service availalble ;-)

Christian




Reply via email to