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 <u...@spielviel.de> 27.07.2009 13:00
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
Tapestry users <users@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-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




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

Reply via email to