On Fri, 06 May 2011 05:36:06 -0300, Josh Kamau <joshnet2...@gmail.com> wrote:

Hi Team,

Hi!

I am  still learning t5 So i may ask very many questions. So here is a
question on injections.

I have so far learnt the following regarding injection:

When injecting Services , Use @Inject
When injecting pages, user @InjectPage
When injecting Components, user @InjectComponent

Am i right so far?

Yes, but @Inject is not just for services, but other types of injection too: configuration symbols (together with @Symbol), assets (together with @Path), etc.

Now in one of the examples, found here
http://tapestry.apache.org/ajax-components-faq.html, @Inject is used on
block component. I was expecting to find @InjectComponent, am i missing
something?

Blocks are not components. Blocks are blocks. :) They're declared in templates and @Inject is one way to get it (the other is to use the *block methods of ComponentResources).

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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

Reply via email to