You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by karthi <ra...@snovabits.net> on 2012/09/06 09:35:50 UTC

How to split up components in a tapestry page

Hi everyone,

 What I've done is: 


I am designing a page in tapestry, In that page now showing four components

Header
Topitems (Contains list of videos)
Categories (Contains list of videos but specific to categories)
Footer

What I've done is just design the four components in a single page itself
using Index.tml, Index.java, Styles.css

 What I need is: 


Now I want to separate the designs in index.tml to a separate component
layouts like

Header.tml
Topitems.tml
Categories.tml
Footer.tml 

& in Index.tml all I want to just call to those four component layouts.

I've tried with tapestry component layout & created Header.tml and done the
header designs in that & called in Index.tml, it works!!! But when I created
another layout Footer.tml I faced a problem in calling more that one layout
in Index.tml, How do I do that?

Thanks in advance,
Karthi.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to split up components in a tapestry page

Posted by Stephan Windmüller <st...@tu-dortmund.de>.
On 06.09.2012 11:14, wrote karthi:

> Here exactly what do you mean by:
>                     Create components for Header, TopItems, (Can you point
> me an example & Can you please explain a bit more?)

At first, create a layout component as described here:

https://tapestry.apache.org/layout-component.html

After that, you may (but do not have to) create single components for
header and footer which can be used in the layout component.

HTH
 Stephan


Re: How to split up components in a tapestry page

Posted by karthi <ra...@snovabits.net>.
Many thanks @Lance Java...

I have tried & created two components header, footer & integrated in my
Index.tml page!!
It works cool!!!

This example
http://jumpstart.doublenegative.com.au/jumpstart/examples/component/creatingcomponents
is very helpful...

Thanks again!!!



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079p5716092.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to split up components in a tapestry page

Posted by Lance Java <la...@googlemail.com>.
A component is a java class and and an optional tml file that MUST be in the
foo.bar.components package (where foo.bar is your base package).

Documentation here: http://tapestry.apache.org/component-classes.html
Examples here:
http://jumpstart.doublenegative.com.au/jumpstart/examples/component/creatingcomponents







--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079p5716089.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to split up components in a tapestry page

Posted by karthi <ra...@snovabits.net>.
Thanks again!!! & Sorry, I could not understand. My mistake!

Here exactly what do you mean by:
                    Create components for Header, TopItems, (Can you point
me an example & Can you please explain a bit more?)



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079p5716088.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to split up components in a tapestry page

Posted by Lance Java <la...@googlemail.com>.
Yes, that's exactly what tapestry is great at!!

1. Create components for Header, TopItems, Categories and Footer
2. You could then use the components directly in a page
3. Or, you could create a Layout which contains the 4 components and then
re-use this Layout across all of your pages.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079p5716087.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to split up components in a tapestry page

Posted by karthi <ra...@snovabits.net>.
@Lance Java thanks for your reply...

Let us forget the terminologies, components & layouts..

All I want is to create a four separate tml pages:

i)   Header (Contains styles, codes to display header alone)

ii)  Top-items videos list (Contains codes to display top videos list)

iii) Categories videos list (display categories...)

iv) Footer (display footer...)

& I want to integrate this four in a single Index.tml page (I need it
because re-usability of separate components, easier re-positioning ...) If I
have this feature, in some other page if I am supposed to use only header,
top-items then it will be easy for me to call, in other page if I am
supposed to place categories first then top-items next it will be easy (but
it will be difficult if I have all this 4 in a single layout)

Is this possible?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079p5716086.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to split up components in a tapestry page

Posted by Lance Java <la...@googlemail.com>.
It sounds like you are either confusing terminology or actual functionality.

Let's clear one thing up.
1. You can have many components on a page
2. You can only have one Layout component per page (a Layout is a special
component)
3. Layout components can contain normal components

Most applications will have only 1 or 2 layouts but will have many
components. See this JumpStart examplet example [1] where there 1 layout
applied to 2 pages with a common left, right and footer. These could easily
be custom components

[1]
http://jumpstart.doublenegative.com.au/jumpstart/examples/component/thelayoutcomponent1



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079p5716083.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


RE: How to split up components in a tapestry page

Posted by karthi <ra...@snovabits.net>.
@Mahendra thanks for your reply.

That's not my requirement, I need to create 4 layout components separately 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079p5716085.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


RE: How to split up components in a tapestry page

Posted by "Athneria, Mahendra" <ma...@atos.net>.
Do one thing. Create only one layout and that layout contain those four components. Now that layout you can use in the pages. 

Is it clear to you?

Regards,
Mahendra

-----Original Message-----
From: karthi [mailto:rathinasamy.r.s@snovabits.net] 
Sent: Thursday, September 06, 2012 1:06 PM
To: users@tapestry.apache.org
Subject: How to split up components in a tapestry page


Hi everyone,

 What I've done is: 


I am designing a page in tapestry, In that page now showing four components

Header
Topitems (Contains list of videos)
Categories (Contains list of videos but specific to categories)
Footer

What I've done is just design the four components in a single page itself
using Index.tml, Index.java, Styles.css

 What I need is: 


Now I want to separate the designs in index.tml to a separate component
layouts like

Header.tml
Topitems.tml
Categories.tml
Footer.tml 

& in Index.tml all I want to just call to those four component layouts.

I've tried with tapestry component layout & created Header.tml and done the
header designs in that & called in Index.tml, it works!!! But when I created
another layout Footer.tml I faced a problem in calling more that one layout
in Index.tml, How do I do that?

Thanks in advance,
Karthi.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-split-up-components-in-a-tapestry-page-tp5716079.html
Sent from the Tapestry - User mailing list archive at Nabble.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