This sounds like an if statement.

<span jwcid="@If" condition="ognl:verboseSuperuser">
  <span jwcid="@CompVerboseSuperuser"/>
</span>

The issue with tapestry is not the act of choosing what component to
render, that's pretty easy, but it's the
defining/constructing/initializing/binding part.  I don't know how to do
all of that at runtime, and you probably shouldn't because of page
construction caching, etc.




Kim Thrysøe wrote:
> 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]

Reply via email to