I don't know about such dynamically rendered component in Tapestry. (I don't say it is not possible: I'm almost sure that it can be done by clever usage of classloaders.) Although this feature is requested already several times on the list I think there is always a workaround :) Maybe you should consider using a portlet container with Tapestry's portlet support if you need such portal-like functionality.

BR,
Norbi

----- Original Message ----- From: <[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Monday, August 15, 2005 1:06 PM
Subject: Re: Choosing components at runtime


Hi

But what if we wanted to resolve the component at runtime without having to
specify each component in a Block statement?

I was thinking about using e.g. an Any component alike component. Which was
able to delegate to a wrapped component or such. Is this doable or has
anybody ever done something similar?

regards, Lars Borup Jensen

On Mon, 15 Aug 2005 10:38:42 +0200, Norbert Sándor wrote
Check out Block and RenderBlock.
You can choose at runtime which Block you would like to render.

BR,
Norbi

----- Original Message ----- From: "Kim Thrysøe" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, August 15, 2005 10:26 AM
Subject: Choosing components at runtime

> Hi all,
>
> Is it possible, _at runtime_, to choose which component to use?
>
> Example: A request parameter contains a users choice of renderer which,
> along with the users role (taken from a user object on pagevisit), is
> used to determine which component to include:
> Request parameter:  renderer=verbose
> Role: superuser
> Desired result, had it been hardcoded: <span
> jwcid="@CompVerboseSuperuser"/>
>
> Could I write a "IncludeByRequestAndRole" component, or is there a
> simpler/better way to do this sort of thing?
> /Kim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Lars Borup Jensen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to