On Fri, 08 Oct 2010 23:56:18 -0300, Fanzhen <fanzhen.m...@hotmail.com>
wrote:
well ,you know, there maybe two ways to import a component in page tml.
You don't import a component in a page template, you define one component
instance in a page or component template.
first way,
<t:yourcomponent t:perameter="xxx"/>, I can put two same components
which are using in two places in one page.
and second way,
<div t:id="your component define in your page "/>, well this way I
could handle the it in page class.
These two ways of declaring a component instance have the same result.
the problem is if I do the first way, how to handle the component ???
What do you mean by handle? Components are not handled, events are.
If you want to access their instances, you use the @InjectComponent
annotation. Example:
<t:form t:id="myform"> or <form t:type="Form" t:id="myform">
@InjectComponent
private Form myform;
--
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