You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by matt22 <s1...@zoznam.sk> on 2010/07/08 07:25:03 UTC

Inject in SetupRender?

Hi,
Is it possible to inject componets in setupRender, or beginRender?

If in layout i have 5 components and i want to inject only some of the
components(depends on DBS settings).

thanks for any suggestion in advance,

and sorry for my terrible english, thanks.. :)
-- 
View this message in context: http://old.nabble.com/Inject-in-SetupRender--tp29100030p29100030.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: Inject in SetupRender?

Posted by Sven Homburg <ho...@googlemail.com>.
add an If-component to your page class like this

@Component(parameters = {"test=whatever"}
private If ifWhateverIsTrue

and put your components in you page-template between the if-tag
like this:

<span t:id="ifWhateverIsTrue">
 ..... put you components/html code here ......
</span>

with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org




2010/7/8 matt22 <s1...@zoznam.sk>

>
> Hi,
> Is it possible to inject componets in setupRender, or beginRender?
>
> If in layout i have 5 components and i want to inject only some of the
> components(depends on DBS settings).
>
> thanks for any suggestion in advance,
>
> and sorry for my terrible english, thanks.. :)
> --
> View this message in context:
> http://old.nabble.com/Inject-in-SetupRender--tp29100030p29100030.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: Inject in SetupRender?

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 08 Jul 2010 02:25:03 -0300, matt22 <s1...@zoznam.sk> wrote:

> Hi,

Hi!

> Is it possible to inject componets in setupRender, or beginRender?

You can only inject components in classes using the @InjectComponent  
annotation.

> If in layout i have 5 components and i want to inject only some of the
> components(depends on DBS settings).

It doesn't make a difference injecting 1 or 100 components. All them are  
already instantiated in the page or component.

-- 
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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org