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]




--
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

Reply via email to