Can't you use Block/RenderBlock for this?

-----Original Message-----
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 30, 2006 12:29 PM
To: Tapestry users; users@tapestry.apache.org
Subject: RE: Is it possible to "swap components"?

Paul,
We use a technique where we have a component that renders components
dynamically.  Basically, we put them all in a "page" that is never
displayed.  Then at runtime, we dynamically render a particular component.

regards,

Mark


-----Original Message-----
From: Paul Tongyoo [mailto:[EMAIL PROTECTED]
Sent: Thu 6/29/2006 6:19 PM
To: users@tapestry.apache.org
Subject: Is it possible to "swap components"?
 
Hello all!

 

I'd like to define a generic "component placeholder" that does not have any
specific type at compile time.  Something like:

 

<span jwcid="@ComponentContainer" component="ognl:someComponent>Component
Placeholder</span>

 

All the ComponentContainer would do is render the component that it's
passed...

 

<component-specification>

            <parameter name="component" required="yes" />

            

            <!-I do NOT want to specify the 'type' attribute here because it
can vary -->

<component id="ComponentDisplay" property="component" />

</component-specification>

 

ComponentContainer.HTML:  <span jwcid="ComponentDisplay">Component displays
Here</span>

 

However Tapestry complains that the type of component isn't specified in the
ComponentContainer.jwc.  I also cannot pass an OGNL expression as the 'type'
attribute value.  Has anyone tried doing something similar - essentially
swapping different components into a component placeholder at runtime?

 

Thanks all for advice!

 

Paul

 





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

Reply via email to