It is somewhat confusing. Blocks seem like components because they are
defined in the template. But Thiago is right, they're just "Blocks".

Here is a good reference you can use as a rule of thumb for what is (and is
not) a component:

http://tapestry.apache.org/component-reference.html

At the bottom, there is a list of base classes which make a component class
a component. If a class does not derive from one of them, it technically IS
NOT a component. And Block, derives from BaseLocaltable therefore it is not
a component.

And of course, you use @InjectComponent to inject components defined in the
template.

Therefore, since Block is not a component, you use @Inject, as Thiago said.

Adam

On Fri, May 6, 2011 at 6:52 AM, Josh Kamau <joshnet2...@gmail.com> wrote:

> Thanks Thiago,
>
> I actually thought blocks are components. I didnt know there are pages,
> components and blocks .[?]
>
> regards.
> Josh.
>

Reply via email to