Yes Robert; that is EXACTLY what I'm looking for. I'm willing to write the
meta component myself but I don't know how to ensure Tapestry loads the
component dynamically. I'm sure there is a service somewhere and I simply
use the path to the component or some such. Sadly; this is something I
assumed would be a trivial thing to implement but now it's proving to be a
nightmare.
Peter: I've poured over those examples closely now and I still don't see how
this does what I need. I'm not trying to be argumentative or dense, but I'm
not seeing how it provides what I'm looking for. The best I can come up with
using RenderBlock is something like this:
TEMPLATE
-=-=-
<html>
...
<span jwcid="@RenderBlock" block="ad1">Ad1</span>
<span jwcid="@RenderBlock" block="ad2">Ad1</span>
<span jwcid="@RenderBlock" block="ad2">Ad1</span>
...
</html>
PAGE USING TEMPLATE (one of almost 2000)
-=-=-
<html>
....
<span jwcid="[EMAIL PROTECTED]">
<span jwcid="@otherProductsListThisAd">
</span>
<span jwcid="[EMAIL PROTECTED]">
<span jwcid="@otherPurchasedProductsAd">
</span>
<span jwcid="[EMAIL PROTECTED]">
<span jwcid="@popularProductsAd">
</span>
....
</html>
Thanks for any suggestions or advice!
Michael
----- Original Message -----
From: "Robert Binna" <[EMAIL PROTECTED]>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Sunday, September 24, 2006 9:51 AM
Subject: Re: Equivalent of JSP Includes?
But if RenderBlock is used the Block that should be rendered must be
somewhere defined, or do I get it totaly wrong?
Is something like this possible (I think that's what Mike wants to do):
<span jwcid="@MetaComponent" componentName="ognl:nameOfComponent"
[informal parameters.....] />
Robert
Jesse Kuhnert schrieb:
The page I referenced gives you an example of what you asked for.
http://tapestry.apache.org/tapestry4.1/components/RenderBlock.html
On 9/24/06, Mike Grundvig <[EMAIL PROTECTED]> wrote:
Doh! That's the second time someone has suggested RenderBlock to me, but
apparently I'm dense because I really can't see how that does what I
need.
If I make my original example JSP more sophisticated, how could render
block
do this?
<%
String pageToInclude = "blah_" + request.getParameter("id") +
".html";
%>
<jsp:include page="<%=pageToInclude%>">
My understanding is that render block lets me put Blocks in the page
that
is
using the template and the template itself will render that out inline.
I
don't see how I can pass another tapestry component name and the render
block will render it. Please correct me if I'm mistaken. Thanks!
Michael
----- Original Message -----
From: "Jesse Kuhnert" <[EMAIL PROTECTED]>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Sunday, September 24, 2006 9:32 AM
Subject: Re: Equivalent of JSP Includes?
> Ah, then you definitely want to use RenderBlock.
>
> http://tapestry.apache.org/tapestry4.1/components/RenderBlock.html
>
> On 9/24/06, Mike Grundvig <[EMAIL PROTECTED]> wrote:
>>
>> But how can you dynamically define the component name? I have 20-30
>> custom
>> components (each one is an ad) and one template for the whole site
with
>> spots for 6 components. The site has an external tool to manage which
>> page
>> has which of the 20-30 components in what location. I want to know
how
to
>> do
>> that dynamically in Tapestry. Basically, I really want to maintain
only
a
>> single template for the site but still show different components in
>> places.
>> Thanks!
>>
>> Michael
>>
>> ----- Original Message -----
>> From: "Jesse Kuhnert" <[EMAIL PROTECTED]>
>> To: "Tapestry users" <users@tapestry.apache.org>
>> Sent: Sunday, September 24, 2006 9:21 AM
>> Subject: Re: Equivalent of JSP Includes?
>>
>>
>> >I usually do something like:
>> >
>> > <span jwcid="@MyCustomComponentName" />
>> >
>> > On 9/24/06, Mike Grundvig <[EMAIL PROTECTED]> wrote:
>> >>
>> >> How do you do the little snippet below in Tapestry?
>> >>
>> >> <%
>> >> // This could be any code needed, but it results in a specific
>> >> page
>> >> String pageToInclude = "blah.html";
>> >> %>
>> >>
>> >> <jsp:include page="<%=pageToInclude%>">
>> >>
>> >> Thanks!
>> >>
>> >> Michael Grundvig
>> >> Electrotank, Inc
>> >> http://www.electrotank.com
>> >>
>> >>
>> >>
---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > Jesse Kuhnert
>> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
>> >
>> > Open source based consulting work centered around
>> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]