You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Isak-Rickyanto <is...@telkom.net> on 2003/06/11 05:14:41 UTC

About tile and portlet

I am newbie in Tapestry.. and I believe that tapestry is 
good... and may be better than Struts.

But I have question.. in Struts there is Tile or like 
templating concept.. or there is portlet in Jetspeed..

Can we do have the same action or can we do like 
those.. in Tapestry?

Sorry,,  I'm just newbie want to learn Tapestry.. because 
the comments in Theserverside is very good... :)
===========================================================================================
"TELKOMNet Instan memberikan diskon 40% untuk akses malam hari dari pukul 23.00 sampai 06.00.
Berlaku untuk wilayah Jawa Timur mulai 1 Mei 2003 sampai 30 Juni 2003."
===========================================================================================

Re: About tile and portlet

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Yes, I believe you can using the Block and RenderBlock components. You 
basically create your blocks in one place like the jsp fragments and you 
can dynamically pass a "block" to the RenderBlock component which would 
render it. Take a look at the example at component reference, 
http://jakarta.apache.org/tapestry/doc_frame.html

-Harish

Shawn Smith wrote:

>I have a question about a similar subject.
>
>In JSPs I have used the include directive to dynamically insert page
>fragments into my main page.  So basically the main page looks similar to
>this:
>
>   Header
>
>   <jsp:include page="<%=UI.getNavigationInclude()%>" flush="true"/>
>
>   <jsp:include page="<%=UI.getMainInclude()%>" flush="true"/>
>
>   Footer
>
>And then I have a zillion navigation pages and main pages that consist of
>just the navigation portion and the main part of this page.  So if I ever
>need to change the header or the footer I only need to edit the single file.
>
>Is there a way to dynamically include pages or page fragments into a page in
>a similar fashion?
>
>Thanks,
>
>Shawn
>
>-----Original Message-----
>From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net]
>Sent: Tuesday, June 10, 2003 9:30 PM
>To: Tapestry users
>Subject: Re: About tile and portlet
>
>
>I had the same questions when I came Tapestry first. Take a look at the
>Border component in the Vlib example that comes with Tapestry.
>Basically, you create a component for all the repeated portions of
>various pages and use this component in those pages instead of repeating
>it. In the Vlib example this component is the Border component.
>
>-Harish
>
>Isak-Rickyanto wrote:
>
>  
>
>>I am newbie in Tapestry.. and I believe that tapestry is good... and
>>may be better than Struts.
>>
>>But I have question.. in Struts there is Tile or like templating
>>concept.. or there is portlet in Jetspeed..
>>
>>Can we do have the same action or can we do like those.. in Tapestry?
>>
>>Sorry,,  I'm just newbie want to learn Tapestry.. because the comments
>>in Theserverside is very good... :)
>>
>>    
>>
>============================================================================
>===============
>  
>
>>"TELKOMNet Instan memberikan diskon 40% untuk akses malam hari dari
>>pukul 23.00 sampai 06.00.
>>Berlaku untuk wilayah Jawa Timur mulai 1 Mei 2003 sampai 30 Juni 2003."
>>
>>    
>>
>============================================================================
>===============
>  
>
>>---------------------------------------------------------------------
>>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: About tile and portlet

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
You'll basically turn your thinking inside out and create a component.  Components can have their
own templates in Tapestry (unlike JSP tags) and theres a component, RenderBody, that specifically
allows you to integrate a component's template with the container's template ... it all flows very
naturally.

If you look at the Workbench or the Vlib, they have complex navigational borders with a lot of
logic.  Each page (in both apps) does the equivalent of:

<span jwcid="border">

Page specific content goes here.

</span>

The border component takes care of the <html>, <body> tags, a <table> around the page (for layout),
rendering the correct images for the various tabs and other stuff.

When simple containment no longer works, you can use the Block and RenderBlock components to
literally "tear out" a portion of a page and pass it around as a unit, even to another page.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Shawn Smith [mailto:shawn@shawnco-civil.com] 
> Sent: Wednesday, June 11, 2003 12:02 AM
> To: Tapestry users
> Subject: RE: About tile and portlet
> 
> 
> I have a question about a similar subject.
> 
> In JSPs I have used the include directive to dynamically 
> insert page fragments into my main page.  So basically the 
> main page looks similar to
> this:
> 
>    Header
> 
>    <jsp:include page="<%=UI.getNavigationInclude()%>" flush="true"/>
> 
>    <jsp:include page="<%=UI.getMainInclude()%>" flush="true"/>
> 
>    Footer
> 
> And then I have a zillion navigation pages and main pages 
> that consist of just the navigation portion and the main part 
> of this page.  So if I ever need to change the header or the 
> footer I only need to edit the single file.
> 
> Is there a way to dynamically include pages or page fragments 
> into a page in a similar fashion?
> 
> Thanks,
> 
> Shawn
> 
> -----Original Message-----
> From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net]
> Sent: Tuesday, June 10, 2003 9:30 PM
> To: Tapestry users
> Subject: Re: About tile and portlet
> 
> 
> I had the same questions when I came Tapestry first. Take a 
> look at the Border component in the Vlib example that comes 
> with Tapestry. Basically, you create a component for all the 
> repeated portions of various pages and use this component in 
> those pages instead of repeating it. In the Vlib example this 
> component is the Border component.
> 
> -Harish
> 
> Isak-Rickyanto wrote:
> 
> > I am newbie in Tapestry.. and I believe that tapestry is 
> good... and 
> > may be better than Struts.
> >
> > But I have question.. in Struts there is Tile or like templating 
> > concept.. or there is portlet in Jetspeed..
> >
> > Can we do have the same action or can we do like those.. in 
> Tapestry?
> >
> > Sorry,,  I'm just newbie want to learn Tapestry.. because 
> the comments 
> > in Theserverside is very good... :)
> >
> ==============================================================
> ==============
> ===============
> >
> > "TELKOMNet Instan memberikan diskon 40% untuk akses malam hari dari 
> > pukul 23.00 sampai 06.00. Berlaku untuk wilayah Jawa Timur 
> mulai 1 Mei 
> > 2003 sampai 30 Juni 2003."
> >
> ==============================================================
> ==============
> ===============
> >
> >
> > 
> ---------------------------------------------------------------------
> > 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: About tile and portlet

Posted by Shawn Smith <sh...@shawnco-civil.com>.
I have a question about a similar subject.

In JSPs I have used the include directive to dynamically insert page
fragments into my main page.  So basically the main page looks similar to
this:

   Header

   <jsp:include page="<%=UI.getNavigationInclude()%>" flush="true"/>

   <jsp:include page="<%=UI.getMainInclude()%>" flush="true"/>

   Footer

And then I have a zillion navigation pages and main pages that consist of
just the navigation portion and the main part of this page.  So if I ever
need to change the header or the footer I only need to edit the single file.

Is there a way to dynamically include pages or page fragments into a page in
a similar fashion?

Thanks,

Shawn

-----Original Message-----
From: Harish Krishnaswamy [mailto:hkrishnaswamy@comcast.net]
Sent: Tuesday, June 10, 2003 9:30 PM
To: Tapestry users
Subject: Re: About tile and portlet


I had the same questions when I came Tapestry first. Take a look at the
Border component in the Vlib example that comes with Tapestry.
Basically, you create a component for all the repeated portions of
various pages and use this component in those pages instead of repeating
it. In the Vlib example this component is the Border component.

-Harish

Isak-Rickyanto wrote:

> I am newbie in Tapestry.. and I believe that tapestry is good... and
> may be better than Struts.
>
> But I have question.. in Struts there is Tile or like templating
> concept.. or there is portlet in Jetspeed..
>
> Can we do have the same action or can we do like those.. in Tapestry?
>
> Sorry,,  I'm just newbie want to learn Tapestry.. because the comments
> in Theserverside is very good... :)
>
============================================================================
===============
>
> "TELKOMNet Instan memberikan diskon 40% untuk akses malam hari dari
> pukul 23.00 sampai 06.00.
> Berlaku untuk wilayah Jawa Timur mulai 1 Mei 2003 sampai 30 Juni 2003."
>
============================================================================
===============
>
>
> ---------------------------------------------------------------------
> 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: About tile and portlet

Posted by Harish Krishnaswamy <hk...@comcast.net>.
I had the same questions when I came Tapestry first. Take a look at the 
Border component in the Vlib example that comes with Tapestry. 
Basically, you create a component for all the repeated portions of 
various pages and use this component in those pages instead of repeating 
it. In the Vlib example this component is the Border component.

-Harish

Isak-Rickyanto wrote:

> I am newbie in Tapestry.. and I believe that tapestry is good... and 
> may be better than Struts.
>
> But I have question.. in Struts there is Tile or like templating 
> concept.. or there is portlet in Jetspeed..
>
> Can we do have the same action or can we do like those.. in Tapestry?
>
> Sorry,,  I'm just newbie want to learn Tapestry.. because the comments 
> in Theserverside is very good... :)
> =========================================================================================== 
>
> "TELKOMNet Instan memberikan diskon 40% untuk akses malam hari dari 
> pukul 23.00 sampai 06.00.
> Berlaku untuk wilayah Jawa Timur mulai 1 Mei 2003 sampai 30 Juni 2003."
> =========================================================================================== 
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>