You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ulrich Stärk <ul...@spielviel.de> on 2009/07/27 13:00:13 UTC
embedded components
Why do embedded components declared with @Component _have_ to have a
corresponding element in the template? If I just want to use them as a
return value from some delegating method, why do I still have to declare
them in the template, bloating it with unused stuff?
Uli
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: embedded components
Posted by Ulrich Stärk <ul...@spielviel.de>.
I already guessed that I'd get "static structure, dynamic behaviour" as
an answer but declaring the component inside the page class *IS* static.
I don't see the need to also have it in the template.
Uli
On 27.07.2009 15:16 schrieb Kristian Marinkovic:
> i think because of tapestry's rule: static structure, dynamic behaviour :)
>
> what i ended up doing is to have a BlockService that contains a
> contribution
> of all available Blocks in my app with a unique id. anytime i need such a
> component i just ask my service:
>
> @Inject
> private BlockService blockService
>
> return blockService.get("blockid");
>
> or you could create a base page that contains all Blocks and components
> that could be used in some context.
>
> i hope this helps :)
>
> g,
> kris
>
>
>
>
> Ulrich Stärk <ul...@spielviel.de>
> 27.07.2009 13:00
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
>
>
> An
> Tapestry users <us...@tapestry.apache.org>
> Kopie
>
> Thema
> embedded components
>
>
>
>
>
>
>
> Why do embedded components declared with @Component _have_ to have a
> corresponding element in the template? If I just want to use them as a
> return value from some delegating method, why do I still have to declare
> them in the template, bloating it with unused stuff?
>
> Uli
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: embedded components
Posted by Kristian Marinkovic <kr...@porsche.co.at>.
i think because of tapestry's rule: static structure, dynamic behaviour :)
what i ended up doing is to have a BlockService that contains a
contribution
of all available Blocks in my app with a unique id. anytime i need such a
component i just ask my service:
@Inject
private BlockService blockService
return blockService.get("blockid");
or you could create a base page that contains all Blocks and components
that could be used in some context.
i hope this helps :)
g,
kris
Ulrich Stärk <ul...@spielviel.de>
27.07.2009 13:00
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>
An
Tapestry users <us...@tapestry.apache.org>
Kopie
Thema
embedded components
Why do embedded components declared with @Component _have_ to have a
corresponding element in the template? If I just want to use them as a
return value from some delegating method, why do I still have to declare
them in the template, bloating it with unused stuff?
Uli
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org