You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sangna Lakshmi <sa...@yahoo.com> on 2004/03/18 02:21:34 UTC

Server side includes and Tapestry

Hello-

I'm writing the help pages for an application written using the
Tapestry framework.  I'm trying to generate the entire help document 
from its many spot help pieces by using server side includes.  While
the code that incorporates SSIs works in a non-Tapestry context - which
means that I've set up my web server (Sun ONE Web Server Enterprise
Edition 6.1) correctly - I'm not able to get the SSIs to display in a
Tapestry template file.

An example template file (foo.html) for what I'm trying:
<span jwcid="Border">
<table>
<tr>
<td>some random text here</td>
<td><!--#include file="foo.html"--></td>
</tr>
</table>
</span>

If the above foo.html has the standard HTML tags instead of the <span
jwcid...> tags, it renders the SSIs just fine.

Appreciate any help on this.

Thanks,
Sangna

__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: How to set the template for a component or page dynamically?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 17, 2004, at 9:27 PM, Alex Kwan wrote:
> Hi Erik,
>     I just want to let the component user be able to set the template 
> for
> the component just as easily as set a paramemter.
>     For example:
>     Compoent Foo has a parameter named template
>     so I just use it like this
>     <component id="foo" type="Foo">
>         <binding name="template" expression="assets.fooTemplate">
>     </compoent>
>
>     That's what I want, Can we archieve this easily in Tapestry?

Easily?  Not currently.  But Tapestry is extremely dynamic and 
pluggable.  You can key off the engine and control where templates come 
from, or use ITemplateSourceDelegate.  It definitely won't work with 
the syntax you proposed (currently).

I'm not in a position to devote much time to contemplate this at the 
moment - maybe others have some ideas?

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: How to set the template for a component or page dynamically?

Posted by Alex Kwan <er...@hotmail.com>.
Hi Erik,
    I just want to let the component user be able to set the template for
the component just as easily as set a paramemter.
    For example:
    Compoent Foo has a parameter named template
    so I just use it like this
    <component id="foo" type="Foo">
        <binding name="template" expression="assets.fooTemplate">
    </compoent>

    That's what I want, Can we archieve this easily in Tapestry?

    Thanks alot:)

Alex
----- Original Message ----- 
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, March 18, 2004 10:17 AM
Subject: Re: How to set the template for a component or page dynamically?


> I'm not quite sure of the specifics of your scenario, but a couple of
> brief thoughts:
>
>   - you can override templates.  so if you have a library of components,
> you can override the HTML template by simply putting a the same HTML
> named file into the WEB-INF/classes directory in the right spot.
>
>   - Use ITemplateSourceDelegate and do not include HTML templates into
> your application, and generate them dynamically however you like.
>
> Erik
>
> On Mar 17, 2004, at 9:07 PM, Alex Kwan wrote:
>
> > Hi, All
> >     The more work I have done with Tapestry, The more I found that the
> > real
> > resuable part of the component are specification and classes of these
> > components. Every web apps will has their own look and feel, so the
> > html
> > templates are hard to reuse. So I wonder, can we set the template as a
> > paramter to a component?
> >     Any suggestion will be appreciated.
> >
> > Alex
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: How to set the template for a component or page dynamically?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
I'm not quite sure of the specifics of your scenario, but a couple of 
brief thoughts:

  - you can override templates.  so if you have a library of components, 
you can override the HTML template by simply putting a the same HTML 
named file into the WEB-INF/classes directory in the right spot.

  - Use ITemplateSourceDelegate and do not include HTML templates into 
your application, and generate them dynamically however you like.

Erik

On Mar 17, 2004, at 9:07 PM, Alex Kwan wrote:

> Hi, All
>     The more work I have done with Tapestry, The more I found that the 
> real
> resuable part of the component are specification and classes of these
> components. Every web apps will has their own look and feel, so the 
> html
> templates are hard to reuse. So I wonder, can we set the template as a
> paramter to a component?
>     Any suggestion will be appreciated.
>
> Alex
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


How to set the template for a component or page dynamically?

Posted by Alex Kwan <er...@hotmail.com>.
Hi, All
    The more work I have done with Tapestry, The more I found that the real
resuable part of the component are specification and classes of these
components. Every web apps will has their own look and feel, so the html
templates are hard to reuse. So I wonder, can we set the template as a
paramter to a component?
    Any suggestion will be appreciated.

Alex

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org