You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mike Grundvig <mi...@electrotank.com> on 2006/09/24 16:19:06 UTC
Equivalent of JSP Includes?
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Mike Grundvig <mi...@electrotank.com>.
You are absolutely correct Martin; I can simple read the ad HTML from the
file system and have a low-level component inject the ad data into the
output. This is a last resort though because as soon as I do this, I lose
all the niceties of Tapestry. The intent is for the "ads" (loose term here)
to be 1 to 1 marketing type ads as well as dynamic in their own right.
Thanks!
Michael Grundvig
Electrotank, Inc
http://www.electrotank.com
----- Original Message -----
From: "Martin Strand" <ma...@entcap.se>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Sunday, September 24, 2006 9:39 AM
Subject: Re: Equivalent of JSP Includes?
Ads are often static rather than dynamic. Perhaps you can just use Insert
and output raw HTML instead of making each ad a component?
Martin
On Sun, 24 Sep 2006 16:31:12 +0200, Mike Grundvig <mi...@electrotank.com>
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" <jk...@gmail.com>
> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>> -- 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Martin Strand <ma...@entcap.se>.
Ads are often static rather than dynamic. Perhaps you can just use Insert
and output raw HTML instead of making each ad a component?
Martin
On Sun, 24 Sep 2006 16:31:12 +0200, Mike Grundvig <mi...@electrotank.com>
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" <jk...@gmail.com>
> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>> -- 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: Equivalent of JSP Includes?
Posted by Mark Stang <ms...@pingidentity.com>.
Did you ever get a satisfactory solution? I was on vacation...
Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity
-----Original Message-----
From: Mike Grundvig [mailto:mike@electrotank.com]
Sent: Sun 9/24/2006 9:11 AM
To: Tapestry users
Subject: Re: Equivalent of JSP Includes?
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="ad1@Block">
<span jwcid="@otherProductsListThisAd">
</span>
<span jwcid="ad2@Block">
<span jwcid="@otherPurchasedProductsAd">
</span>
<span jwcid="ad3@Block">
<span jwcid="@popularProductsAd">
</span>
....
</html>
Thanks for any suggestions or advice!
Michael
----- Original Message -----
From: "Robert Binna" <r....@synedra.com>
To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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" <jk...@gmail.com>
>>> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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" <jk...@gmail.com>
>>> >> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
>>> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
>>> >> >>
>>> >> >>
>>> >> >
>>> >> >
>>> >> > --
>>> >> > 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: users-unsubscribe@tapestry.apache.org
>>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > 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: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Dobrin Ivanov <do...@yahoo.com>.
Hi,
I have searching for the same thing in the past and
found this one:
DynamicBlock - Choosing Tapestry Components at
Runtime
http://www.behindthesite.com/blog/C1931765677/E1630021481/
I haven't tested it yet ...
--- Mike Grundvig <mi...@electrotank.com> wrote:
> 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="ad1@Block">
> <span jwcid="@otherProductsListThisAd">
> </span>
> <span jwcid="ad2@Block">
> <span jwcid="@otherPurchasedProductsAd">
> </span>
> <span jwcid="ad3@Block">
> <span jwcid="@popularProductsAd">
> </span>
> ....
> </html>
>
> Thanks for any suggestions or advice!
>
> Michael
>
> ----- Original Message -----
> From: "Robert Binna" <r....@synedra.com>
> To: "Tapestry users" <us...@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 <mi...@electrotank.com>
> 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" <jk...@gmail.com>
> >>> To: "Tapestry users" <us...@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
> <mi...@electrotank.com> 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" <jk...@gmail.com>
> >>> >> To: "Tapestry users"
> <us...@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
> <mi...@electrotank.com> 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:
> users-unsubscribe@tapestry.apache.org
> >>> >> >> For additional commands, e-mail:
> users-help@tapestry.apache.org
> >>> >> >>
> >>> >> >>
> >>> >> >
> >>> >> >
> >>> >> > --
> >>> >> > Jesse Kuhnert
> >>> >> > Tapestry/Dojo/(and a dash of TestNG), team
> member/developer
>
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Mike Grundvig <mi...@electrotank.com>.
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="ad1@Block">
<span jwcid="@otherProductsListThisAd">
</span>
<span jwcid="ad2@Block">
<span jwcid="@otherPurchasedProductsAd">
</span>
<span jwcid="ad3@Block">
<span jwcid="@popularProductsAd">
</span>
....
</html>
Thanks for any suggestions or advice!
Michael
----- Original Message -----
From: "Robert Binna" <r....@synedra.com>
To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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" <jk...@gmail.com>
>>> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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" <jk...@gmail.com>
>>> >> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
>>> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
>>> >> >>
>>> >> >>
>>> >> >
>>> >> >
>>> >> > --
>>> >> > 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: users-unsubscribe@tapestry.apache.org
>>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > 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: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Robert Binna <r....@synedra.com>.
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 <mi...@electrotank.com> 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" <jk...@gmail.com>
>> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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" <jk...@gmail.com>
>> >> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
>> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > 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: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > 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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Jesse Kuhnert <jk...@gmail.com>.
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 <mi...@electrotank.com> 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" <jk...@gmail.com>
> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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" <jk...@gmail.com>
> >> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > 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: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
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
File Downloading in Tapestry
Posted by Dobrin Ivanov <do...@yahoo.com>.
Hi,
I'm wondering which is the best way to download files
via Tapestry. It could be done via servlet, I have
found a good example here:
http://jspwiki.org/wiki/MakingADownloadServlet
But, is there another way to do it all in Tapestry?
... or the above is the best solution?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Dobrin Ivanov <do...@yahoo.com>.
Did you succeed with this?
It would be great to have this into the core Tapestry
components ..
--- Patrick Moore <tr...@gmail.com>
wrote:
> I would put in a vote for something like the Dynamic
> Block making it into
> the main tap release. I have been wondering how to
> do this myself!
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Patrick Moore <tr...@gmail.com>.
I would put in a vote for something like the Dynamic Block making it into
the main tap release. I have been wondering how to do this myself!
Re: Equivalent of JSP Includes?
Posted by Nick Westgate <ni...@key-planning.co.jp>.
This is for T3, but you might find it relevant:
http://www.tapestrycomponents.org/Tassel/app?service=direct/1/Search/viewComponent&sp=SrobertzInclude
Cheers,
Nick.
Mike Grundvig 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Mike Grundvig <mi...@electrotank.com>.
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" <jk...@gmail.com>
To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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" <jk...@gmail.com>
>> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > 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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Jesse Kuhnert <jk...@gmail.com>.
Ah, then you definitely want to use RenderBlock.
http://tapestry.apache.org/tapestry4.1/components/RenderBlock.html
On 9/24/06, Mike Grundvig <mi...@electrotank.com> 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" <jk...@gmail.com>
> To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
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
Re: Equivalent of JSP Includes?
Posted by Mike Grundvig <mi...@electrotank.com>.
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" <jk...@gmail.com>
To: "Tapestry users" <us...@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 <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Equivalent of JSP Includes?
Posted by Jesse Kuhnert <jk...@gmail.com>.
I usually do something like:
<span jwcid="@MyCustomComponentName" />
On 9/24/06, Mike Grundvig <mi...@electrotank.com> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
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