You don't have to inject via annotations.  You can inject via the .page file
using an <inject> element.

http://jakarta.apache.org/tapestry/UsersGuide/hivemind.html



-----Original Message-----
From: Mark Arnold [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 12, 2006 2:38 PM
To: Tapestry users
Subject: Re: How to use global services?

Is there a way to access the Hivemind service/bean provider, so that 
instead of using annotations, I can do something like this in my Page class:

public abstract class MyPage extends BasePage {
    /* define setters and getters for service1 and service2 ... */
    public MyPage() {
        init();
    }

    public void init() {
        setService1(SomeHivemindHook.getService("service1"));
        setService2(SomeHivemindHook.getService("service2"));
    }
}

Something like this?

Thanks,

MARK

Apache wrote:
> I think it is the easiest way ... in fact all my page classes already
extends a custom class. I just need to inject the dao in the class.
>
> Another aproach that can be used is described in 
>
>
> Thank you.
>
>
> -------------------- m2f --------------------
>
> Sent from www.TapestryForums.com
>
> Read this topic online here: <<topic_link>>
>
> http://www.tapestryforums.com/viewtopic.php?p=14706#14706
>
> -------------------- m2f --------------------
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to