You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2008/03/27 00:20:18 UTC

T5: IOC only app and annotation

Hi,

Can we use annotation with IOC only app? instead of:

Hello hello = registry.getService(Hello.class);

we can do:

@Inject Hello hello;

?
-- 
View this message in context: http://www.nabble.com/T5%3A-IOC-only-app-and-annotation-tp16318689p16318689.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: IOC only app and annotation

Posted by Howard Lewis Ship <hl...@gmail.com>.
Nope, field level injection is only applicable to Tapestry component
classes.  For IoC services, injection is via the classes' constructor.

On Wed, Mar 26, 2008 at 4:20 PM, Angelo Chen <an...@yahoo.com.hk> wrote:
>
>  Hi,
>
>  Can we use annotation with IOC only app? instead of:
>
>  Hello hello = registry.getService(Hello.class);
>
>  we can do:
>
>  @Inject Hello hello;
>
>  ?
>  --
>  View this message in context: http://www.nabble.com/T5%3A-IOC-only-app-and-annotation-tp16318689p16318689.html
>  Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org