Re: t:body + zone

2012-08-07 Thread Dimitris Zenios
I was talking of something like this.

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd;
head
titleMy Nifty Web Application/title
/head
body
div class=nav-top
Nifty Web Application
t:pagelink t:page=indexIndex/t:pagelink
t:pagelink t:page=aboutAbout/t:pagelink
/div

t:alerts/
t:zone t:id=hello
t:body/
/t:zone

div class=nav-bottom
(C) 2008 NiftyWebCo, Inc.
/div
/body
/html

one layout two pages Index and about.If pagelinks are used then the
t:body is not rendered through ajax called..Most probably i have to
use eventlinks but i dont know how through the callback i will load
the appropriate t:body of the page (Index or about)


t:body element should be loaded through ajax calls.
On Tue, Aug 7, 2012 at 4:44 AM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:
 On Mon, 06 Aug 2012 19:36:17 -0300, Dimitris Zenios
 dimitris.zen...@gmail.com wrote:

 Any example or a hint please?


 Layout.tml:

 t:zone t:id=zone ...

 /t:zone



 On Tue, Aug 7, 2012 at 12:13 AM, Thiago H de Paula Figueiredo
 thiag...@gmail.com wrote:

 On Mon, 06 Aug 2012 16:03:44 -0300, Dimitris Zenios
 dimitris.zen...@gmail.com wrote:

 Is there a way to have a layout component and all its body would be
 rendered using zone?



 Yes, why not?

 --
 Thiago H. de Paula Figueiredo

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


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



 --
 Thiago H. de Paula Figueiredo

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


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



Re: t:body + zone

2012-08-07 Thread Thiago H de Paula Figueiredo
On Tue, 07 Aug 2012 05:56:47 -0300, Dimitris Zenios  
dimitris.zen...@gmail.com wrote:



I was talking of something like this.

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd;
head
titleMy Nifty Web Application/title
/head
body
div class=nav-top
Nifty Web Application
t:pagelink t:page=indexIndex/t:pagelink
t:pagelink t:page=aboutAbout/t:pagelink
/div

t:alerts/
t:zone t:id=hello
t:body/
/t:zone

div class=nav-bottom
(C) 2008 NiftyWebCo, Inc.
/div
/body
/html


This will work for the Index page. In this case, you won't need a Layout  
one because Index will serve as that.



one layout two pages Index and about.If pagelinks are used then the
t:body is not rendered through ajax called..Most probably i have to
use eventlinks but i dont know how through the callback i will load
the appropriate t:body of the page (Index or about)


Don't use PageLink. Forget about t:body in this case. Use EventLink with  
zone=hello and return a Block or component instance. Using this  
approach, you'll need to have all the content in the same page and use the  
Environment for passing information. But you can try using different  
pages, but you won't be able to use the activation context for them.  
Instead, you'd need to use the Environment for passing data. For rendering  
other pages, try this (not tested):


@Inject
private ComponentSource componentSource;

@Inject
private Environment environment;

Object onNameOfYourEvent() { // maybe some parameters for context
	Class pageClass = ...; // logic for determining next page. You can also  
use String instead.

environment.push(); // passing information.
	return  
componentSource.getPage(pageClass).getComponentResources().getBody();

}

--
Thiago H. de Paula Figueiredo

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



t:body + zone

2012-08-06 Thread Dimitris Zenios
Is there a way to have a layout component and all its body would be
rendered using zone?Just like google plus does when you change between
pages.

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



Re: t:body + zone

2012-08-06 Thread Thiago H de Paula Figueiredo
On Mon, 06 Aug 2012 16:03:44 -0300, Dimitris Zenios  
dimitris.zen...@gmail.com wrote:



Is there a way to have a layout component and all its body would be
rendered using zone?


Yes, why not?

--
Thiago H. de Paula Figueiredo

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



Re: t:body + zone

2012-08-06 Thread Dimitris Zenios
Any example or a hint please?

On Tue, Aug 7, 2012 at 12:13 AM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:
 On Mon, 06 Aug 2012 16:03:44 -0300, Dimitris Zenios
 dimitris.zen...@gmail.com wrote:

 Is there a way to have a layout component and all its body would be
 rendered using zone?


 Yes, why not?

 --
 Thiago H. de Paula Figueiredo

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


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



Re: t:body + zone

2012-08-06 Thread Thiago H de Paula Figueiredo
On Mon, 06 Aug 2012 19:36:17 -0300, Dimitris Zenios  
dimitris.zen...@gmail.com wrote:



Any example or a hint please?


Layout.tml:

t:zone t:id=zone ...

/t:zone



On Tue, Aug 7, 2012 at 12:13 AM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:

On Mon, 06 Aug 2012 16:03:44 -0300, Dimitris Zenios
dimitris.zen...@gmail.com wrote:


Is there a way to have a layout component and all its body would be
rendered using zone?



Yes, why not?

--
Thiago H. de Paula Figueiredo

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



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




--
Thiago H. de Paula Figueiredo

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



How to use multiple t:body/ tags in single component.

2009-08-25 Thread Prajesh Kacha
Hello,
In my web page I am using one t:body/ tag, but I need multiple t:body/
tag to get replace.
To do that is there any mechanism like specifying Id or some name to the
components.
I search a lot but I didn't find.

I don't know what to do.
Please can any one help me.


Thank in advance.







-- 
Regards,
Prajesh J. Kacha.
Coriolis Technologies Pvt Ltd.


Re: How to use multiple t:body/ tags in single component.

2009-08-25 Thread Carl Crowder
See the bit about template inheritance here: 
http://tapestry.apache.org/tapestry5/guide/templates.html


Prajesh Kacha wrote:

Hello,
In my web page I am using one t:body/ tag, but I need multiple t:body/
tag to get replace.
To do that is there any mechanism like specifying Id or some name to the
components.
I search a lot but I didn't find.

I don't know what to do.
Please can any one help me.


Thank in advance.









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



Re: How to use multiple t:body/ tags in single component.

2009-08-25 Thread Sebastian Hennebrueder

Hello,

I used

t:parameter name=notes
foo
/t:parameter

in a page to pass foo to the layout template which has parameter

Layout class
@Parameter
private Block notes;

public Object getNotes(){
 return notes;
}
Layout template
t:delegate to=notes/


Prajesh Kacha schrieb:

Hello,
In my web page I am using one t:body/ tag, but I need multiple t:body/
tag to get replace.
To do that is there any mechanism like specifying Id or some name to the
components.
I search a lot but I didn't find.

I don't know what to do.
Please can any one help me.


Thank in advance.











--
Best Regards / Viele Grüße

Sebastian Hennebrueder
-
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



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



Re: How to use multiple t:body/ tags in single component.

2009-08-25 Thread Alfonso Quiroga
I have used this:
http://wiki.apache.org/tapestry/Tapestry5SimpleAndPowerfulLayouts

It's a generic solution using blocks! and you don't need to declare
them in the page.

On Tue, Aug 25, 2009 at 9:30 AM, Sebastian
Hennebruederuse...@laliluna.de wrote:
 Hello,

 I used

 t:parameter name=notes
        foo
 /t:parameter

 in a page to pass foo to the layout template which has parameter

 Layout class
 @Parameter
        private Block notes;

        public Object getNotes(){
                 return notes;
        }
 Layout template
 t:delegate to=notes/


 Prajesh Kacha schrieb:

 Hello,
 In my web page I am using one t:body/ tag, but I need multiple t:body/
 tag to get replace.
 To do that is there any mechanism like specifying Id or some name to the
 components.
 I search a lot but I didn't find.

 I don't know what to do.
 Please can any one help me.


 Thank in advance.










 --
 Best Regards / Viele Grüße

 Sebastian Hennebrueder
 -
 Software Developer and Trainer for Hibernate / Java Persistence
 http://www.laliluna.de



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



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



T5.1 t:body question

2009-08-14 Thread Michael Gentry
Hi all, I know I'm still learning, but I'm a bit puzzled as to why:

t:body/

works just fine, but:

span t:type=body/
and
span t:type=Body/

both error out with:

org.apache.tapestry5.ioc.internal.util.TapestryException
Unable to resolve 'body' to a component class name. Available
component types: ActionLink, AddRowLink, AjaxFormLoop, Any,
BeanDisplay, BeanEditForm, BeanEditor, Checkbox, DateField, Delegate,
Errors, EventLink, ExceptionDisplay, Form, FormFragment, FormInjector,
Grid, GridCell, GridColumns, GridPager, GridRows, Hidden, If, Label,
Layout, LinkSubmit, Loop, Output, OutputRaw, PageLink, Palette,
PasswordField, ProgressiveDisplay, PropertyDisplay, PropertyEditor,
Radio, RadioGroup, RemoveRowLink, RenderObject, Select, Submit,
SubmitNotifier, TextArea, TextField, TextOutput, Unless, Zone.

I'm assuming t:body isn't really a component, but a different form of
magic.  Are there other components that aren't really components and
should t:body also support invisible instrumentation, too?

Thanks again!

mrg

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



Re: T5.1 t:body question

2009-08-14 Thread Thiago H. de Paula Figueiredo
Em Fri, 14 Aug 2009 11:57:09 -0300, Michael Gentry mgen...@masslight.net  
escreveu:



I'm assuming t:body isn't really a component, but a different form of
magic.


t:body/ is not a component.


Are there other components that aren't really components


Take a look at  
http://tapestry.apache.org/tapestry5.1/guide/templates.html, section  
Tapestry Elements.



and should t:body also support invisible instrumentation, too?


Using t:type for both components and Tapestry-specific tags (t:body,  
etc) would cause a lot of confusion and would require some level rewriting  
of the template parser. Even using other attribute would require this  
rewriting, so I don't know if it's worth the hassle.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: T5.1 t:body question

2009-08-14 Thread Michael Gentry
On Fri, Aug 14, 2009 at 11:05 AM, Thiago H. de Paula
Figueiredothiag...@gmail.com wrote:
 Em Fri, 14 Aug 2009 11:57:09 -0300, Michael Gentry mgen...@masslight.net
 escreveu:
 Take a look at http://tapestry.apache.org/tapestry5.1/guide/templates.html,
 section Tapestry Elements.

I had seen that section before, but it wasn't really clear (to me,
anyway -- a T5.1 newbie who has also used T4) that it was really
different.

 and should t:body also support invisible instrumentation, too?

 Using t:type for both components and Tapestry-specific tags (t:body, etc)
 would cause a lot of confusion and would require some level rewriting of the
 template parser. Even using other attribute would require this rewriting, so
 I don't know if it's worth the hassle.

It may not be worth the hassle, but given that t:body (not a
component) looks pretty much like t:if, t:form, t:loop, t:textfield,
etc. (components), I think it is a bit confusing.  It looks like a
duck (component), but doesn't quack.  Also, Body was a real component
in T4, so that might add to the confusion for anyone moving on to T5.

Thanks again Thiago!

mrg

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



Re: T5.1 t:body question

2009-08-14 Thread Howard Lewis Ship
The question was: do we introduce one XML namespace for Tapestry
components and a second one for the (finite set) of Tapestry
directives?  I chose to have a single namespace. This could be changed
in the future to have a distinct XML namespace for components and a
separate one for directives. The XML namespace URI would be used to
maintain backwards compatibility.

On Fri, Aug 14, 2009 at 8:23 AM, Michael Gentrymgen...@masslight.net wrote:
 On Fri, Aug 14, 2009 at 11:05 AM, Thiago H. de Paula
 Figueiredothiag...@gmail.com wrote:
 Em Fri, 14 Aug 2009 11:57:09 -0300, Michael Gentry mgen...@masslight.net
 escreveu:
 Take a look at http://tapestry.apache.org/tapestry5.1/guide/templates.html,
 section Tapestry Elements.

 I had seen that section before, but it wasn't really clear (to me,
 anyway -- a T5.1 newbie who has also used T4) that it was really
 different.

 and should t:body also support invisible instrumentation, too?

 Using t:type for both components and Tapestry-specific tags (t:body, etc)
 would cause a lot of confusion and would require some level rewriting of the
 template parser. Even using other attribute would require this rewriting, so
 I don't know if it's worth the hassle.

 It may not be worth the hassle, but given that t:body (not a
 component) looks pretty much like t:if, t:form, t:loop, t:textfield,
 etc. (components), I think it is a bit confusing.  It looks like a
 duck (component), but doesn't quack.  Also, Body was a real component
 in T4, so that might add to the confusion for anyone moving on to T5.

 Thanks again Thiago!

 mrg

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





-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

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



Re: t:body

2009-03-31 Thread Howard Lewis Ship
Please add a bug; Tapestry should not be case sensitive about this
(regardless about what the schema says). t:body and t:Body should be
equivalent.  Tapestry 5.1 may already do this correctly.

On Mon, Mar 30, 2009 at 9:28 AM, Luther Baker lutherba...@gmail.com wrote:
 For some reason, my brain likes to keep a consistent capitalization strategy
 ...

 So, I've grown accustomed to

 t:Parameter
 t:ActionLink
 t:PageLink

 and home/Index.tml, home/Index.java ... etc

 I just noticed that in my latest new project, I used t:Body/ in a layout
 template and I'm getting an error:

 Exception assembling root component of page home/Index: Unable to resolve
 'Body' to a component class name. Available component types: ActionLink,
 AddRowLink, AjaxFormLoop, Any, BeanDisplay, BeanEditForm, BeanEditor,
 Checkbox, DateField, Delegate, Errors, EventLink, ExceptionDisplay, Form,
 FormFragment, FormInjector, Grid, GridCell, GridColumns, GridPager,
 GridRows, If, Label, Layout, LinkSubmit, Loop, Output, OutputRaw, PageLink,
 Palette, PasswordField, ProgressiveDisplay, PropertyDisplay, PropertyEditor,
 Radio, RadioGroup, RemoveRowLink, RenderObject, Select, Submit,
 SubmitNotifier, TextArea, TextField, TextOutput, Unless, Zone.

 If I switch to t:body/ ... all is well.

 Just thought this was interesting.

 -Luther




-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Re: t:body

2009-03-31 Thread Luther Baker
TAP5-615

Thanks,

-Luther


On Tue, Mar 31, 2009 at 1:57 PM, Howard Lewis Ship hls...@gmail.com wrote:

 Please add a bug; Tapestry should not be case sensitive about this
 (regardless about what the schema says). t:body and t:Body should be
 equivalent.  Tapestry 5.1 may already do this correctly.

 On Mon, Mar 30, 2009 at 9:28 AM, Luther Baker lutherba...@gmail.com
 wrote:
  For some reason, my brain likes to keep a consistent capitalization
 strategy
  ...
 
  So, I've grown accustomed to
 
  t:Parameter
  t:ActionLink
  t:PageLink
 
  and home/Index.tml, home/Index.java ... etc
 
  I just noticed that in my latest new project, I used t:Body/ in a
 layout
  template and I'm getting an error:
 
  Exception assembling root component of page home/Index: Unable to resolve
  'Body' to a component class name. Available component types: ActionLink,
  AddRowLink, AjaxFormLoop, Any, BeanDisplay, BeanEditForm, BeanEditor,
  Checkbox, DateField, Delegate, Errors, EventLink, ExceptionDisplay, Form,
  FormFragment, FormInjector, Grid, GridCell, GridColumns, GridPager,
  GridRows, If, Label, Layout, LinkSubmit, Loop, Output, OutputRaw,
 PageLink,
  Palette, PasswordField, ProgressiveDisplay, PropertyDisplay,
 PropertyEditor,
  Radio, RadioGroup, RemoveRowLink, RenderObject, Select, Submit,
  SubmitNotifier, TextArea, TextField, TextOutput, Unless, Zone.
 
  If I switch to t:body/ ... all is well.
 
  Just thought this was interesting.
 
  -Luther
 



 --
 Howard M. Lewis Ship

 Creator Apache Tapestry and Apache HiveMind

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




Re: t:body

2009-03-31 Thread Yancey Yeargan


Tapestry 5.1 does handle this correctly. I checked by changing  
t:body/ to t:Body/ within the Layout.tml template of the  
quickstart example project and it worked as expected.


Yancey



On Mar 31, 2009, at 1:57 PM, Howard Lewis Ship wrote:


Please add a bug; Tapestry should not be case sensitive about this
(regardless about what the schema says). t:body and t:Body should be
equivalent.  Tapestry 5.1 may already do this correctly.

On Mon, Mar 30, 2009 at 9:28 AM, Luther Baker  
lutherba...@gmail.com wrote:
For some reason, my brain likes to keep a consistent capitalization  
strategy

...

So, I've grown accustomed to

t:Parameter
t:ActionLink
t:PageLink

and home/Index.tml, home/Index.java ... etc

I just noticed that in my latest new project, I used t:Body/ in a  
layout

template and I'm getting an error:

Exception assembling root component of page home/Index: Unable to  
resolve
'Body' to a component class name. Available component types:  
ActionLink,

AddRowLink, AjaxFormLoop, Any, BeanDisplay, BeanEditForm, BeanEditor,
Checkbox, DateField, Delegate, Errors, EventLink, ExceptionDisplay,  
Form,

FormFragment, FormInjector, Grid, GridCell, GridColumns, GridPager,
GridRows, If, Label, Layout, LinkSubmit, Loop, Output, OutputRaw,  
PageLink,
Palette, PasswordField, ProgressiveDisplay, PropertyDisplay,  
PropertyEditor,

Radio, RadioGroup, RemoveRowLink, RenderObject, Select, Submit,
SubmitNotifier, TextArea, TextField, TextOutput, Unless, Zone.

If I switch to t:body/ ... all is well.

Just thought this was interesting.

-Luther





--
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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




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



Re: t:body

2009-03-31 Thread Luther Baker
On Tue, Mar 31, 2009 at 2:36 PM, Yancey Yeargan yan...@unt.edu wrote:


 Tapestry 5.1 does handle this correctly. I checked by changing t:body/
 to t:Body/ within the Layout.tml template of the quickstart example
 project and it worked as expected.



That is correct for 5.1.0.0, but this bug is specific to 5.1.0.1.

It is identified it as such in JIRA.

*Affects Version/s:* 5.1.0.1

-Luther


t:body

2009-03-30 Thread Luther Baker
For some reason, my brain likes to keep a consistent capitalization strategy
...

So, I've grown accustomed to

t:Parameter
t:ActionLink
t:PageLink

and home/Index.tml, home/Index.java ... etc

I just noticed that in my latest new project, I used t:Body/ in a layout
template and I'm getting an error:

Exception assembling root component of page home/Index: Unable to resolve
'Body' to a component class name. Available component types: ActionLink,
AddRowLink, AjaxFormLoop, Any, BeanDisplay, BeanEditForm, BeanEditor,
Checkbox, DateField, Delegate, Errors, EventLink, ExceptionDisplay, Form,
FormFragment, FormInjector, Grid, GridCell, GridColumns, GridPager,
GridRows, If, Label, Layout, LinkSubmit, Loop, Output, OutputRaw, PageLink,
Palette, PasswordField, ProgressiveDisplay, PropertyDisplay, PropertyEditor,
Radio, RadioGroup, RemoveRowLink, RenderObject, Select, Submit,
SubmitNotifier, TextArea, TextField, TextOutput, Unless, Zone.

If I switch to t:body/ ... all is well.

Just thought this was interesting.

-Luther


Re: t5 How to use renderInformals together with t:body

2009-03-14 Thread ningdh
Hi,

If you don't write the root element of component in class file, why you need 
render the informal parameters? I can't figure out your usecase.
In my opinion, they should be together.

DH

- Original Message - 
From: luna_guo 
To: users@tapestry.apache.org
Sent: Saturday, March 14, 2009 8:41 PM
Subject: Re: t5 How to use renderInformals together with t:body



Yes,thank you,DH.It works.The only mater is you need write the root element
of your component in class file.Otherwise  the informal parameters will
render some where else.For example:
void beginRender(MarkupWriter
writer){resouces.renderInformalParameters(writer);……
tempalte:

t:body /


when i use the component,informal parameters a rendered to the html
element.




ningdh wrote:
 
 Hi,
 
 I don't think ComponentResources.renderInformals would affect t:body/.
 In my project I can use them together: In beginRender to renderInformals
 and put t:body/ in template.
 
 Thanks,
 DH
 - Original Message - 
 From: luna_guo 
 To: users@tapestry.apache.org
 Sent: Saturday, March 14, 2009 9:31 AM
 Subject: t5 How to use renderInformals together with t:body
 
 
 
 In the template i need t:body/.It doesn't work when i use
 ComponentResources.renderInformals.Is there any way to render body in
 component class ?
 
 
 
 thanks in advance
 luna
 -- 
 View this message in context:
 http://www.nabble.com/t5--How-to-use-renderInformals-together-with-t%3Abody-tp22508231p22508231.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 

 

-- 
View this message in context: 
http://www.nabble.com/t5--How-to-use-renderInformals-together-with-t%3Abody-tp22508231p22512265.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



t5 How to use renderInformals together with t:body

2009-03-13 Thread luna_guo

In the template i need t:body/.It doesn't work when i use
ComponentResources.renderInformals.Is there any way to render body in
component class ?



thanks in advance
luna
-- 
View this message in context: 
http://www.nabble.com/t5--How-to-use-renderInformals-together-with-t%3Abody-tp22508231p22508231.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: t5 How to use renderInformals together with t:body

2009-03-13 Thread ningdh
Hi,

I don't think ComponentResources.renderInformals would affect t:body/. In my 
project I can use them together: In beginRender to renderInformals and put 
t:body/ in template.

Thanks,
DH
- Original Message - 
From: luna_guo 
To: users@tapestry.apache.org
Sent: Saturday, March 14, 2009 9:31 AM
Subject: t5 How to use renderInformals together with t:body


 
 In the template i need t:body/.It doesn't work when i use
 ComponentResources.renderInformals.Is there any way to render body in
 component class ?
 
 
 
 thanks in advance
 luna
 -- 
 View this message in context: 
 http://www.nabble.com/t5--How-to-use-renderInformals-together-with-t%3Abody-tp22508231p22508231.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


RE: Templates and t:body

2007-10-19 Thread Heck, Bob
Ok, still have a problem.  No error, just no header rendered.

---
Here is my Header.java file:

package try.tapestry.components;

public class Header {

public Header()
{

}
} 


Here is my Header.tml file:

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
body
h1This is a header/h1
/body
/html


Here is my Start.tml

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/
titleHello World Title/title
/head
body
t:Header /
Hello world. Start.
/body
/html

---
Here is my Start.java

package try.tapestry.pages;

public class Start {

public Start ()
{

}
}

-
Here is the output when rendered (no header was inserted, just ignored.  No 
errors.):

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;htmlheadlink 
href=/assets/tapestry/default.css rel=stylesheet type=text/cssmeta 
content=text/html; charset=ISO-8859-1 http-equiv=Content-TypetitleHello 
World Title/title/headbody

Hello world. Start.
/body/html
-


Any help is appreciated.  I MUST be missing something so simple.

Bob


-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 19, 2007 18:20
To: Tapestry users
Subject: Re: Templates and t:body

Tapestry mandates a certain organization to your classes.

If you page class is org.example.pages.MyPage then your component class (here, 
Header) must be  org.example.components.Header.  The .pages. and .components. 
part is very specific to Tapestry, hard-wired into the framework.  Those are 
packages that Tapestry scans at startup to locate page and component classes, 
and such classes must exist there (for Tapestry to perform runtime code 
transformation and hot class reloading).

On 10/19/07, Heck, Bob [EMAIL PROTECTED] wrote:

 I created the Header.java and I am getting the same error:
 Unable to resolve 'Header' to a component class name

 Here is my Header.java

 public class Header {

 public Header()
 {

 }
 }

 and my Header.tml

 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 h1This is a header/h1
 /html



 Just to make sure, I dug into my classes files that were deployed and 
 the Header.class is there.

 Josh, what version of Tapestry are you using?  I am using 
 5.0.6-SNAPSHOT

 Angelo, what version are you using?

 Thanks in advance.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf 
 Of Josh Canfield
 Sent: Thursday, October 18, 2007 12:36
 To: Tapestry users
 Subject: Re: Templates and t:body

 Did you create the Header.java?

 On 10/18/07, Angelo Chen [EMAIL PROTECTED] wrote:
 
 
  Hi Jonathan,
 
  I tried your approach, but does not work, here is my steps:
 
  1. create a Header.html in component directory, it has only one 
  line:h2hi my heading/h2 2. I use it in my start.html:
 
  html 
  xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
 titleStart Page/title
  /head
  body
  h1Start Page/h1
 t:Header /
  /body
  /html
 
  It complains:Unable to resolve component type 'Header' to a 
  component class name.
 
  Anything I'm missing here? Thanks,
  A.C.
 
 
  Jonathan Barker wrote:
  
   Sorry, I only answered half of your question.
  
   Including your standard header into hello.tml would be something like:
  
   html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
   head
   titleMy Tapestry Application/title
   /head
   body
   t:header /
   My Page Specific Content
   /body
   /html
  
  
   -Original Message-
   From: Heck, Bob [mailto:[EMAIL PROTECTED]
   Sent: Thursday, October 18, 2007 12:27 PM
   To: Tapestry users
   Subject: RE: Templates and t:body
  
   Or, maybe I should just start at the top.
  
   I have a header that I want to display on every page.  That 
   header html
   (tml) markup is stored in the file header.tml
  
   How do I include this in another file, say hello.tml?  What is 
   the
  syntax
   and component usage?
  
  
  
   -Original Message-
   From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
   Sent: Thursday, October 18, 2007 12:17
   To: Tapestry users
   Subject: Re: Templates and t:body
  
   On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED]
 wrote:
  
So, how does layout.tml know to use specific.tml to fill in the 
t:body/ tag?  Does it have to be injected somehow?  Where 
does it get a reference? How

Re: Templates and t:body

2007-10-19 Thread Howard Lewis Ship
Tapestry mandates a certain organization to your classes.

If you page class is org.example.pages.MyPage then your component class
(here, Header) must be  org.example.components.Header.  The .pages. and
.components. part is very specific to Tapestry, hard-wired into the
framework.  Those are packages that Tapestry scans at startup to locate page
and component classes, and such classes must exist there (for Tapestry to
perform runtime code transformation and hot class reloading).

On 10/19/07, Heck, Bob [EMAIL PROTECTED] wrote:

 I created the Header.java and I am getting the same error:
 Unable to resolve 'Header' to a component class name

 Here is my Header.java

 public class Header {

 public Header()
 {

 }
 }

 and my Header.tml

 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 h1This is a header/h1
 /html



 Just to make sure, I dug into my classes files that were deployed and the
 Header.class is there.

 Josh, what version of Tapestry are you using?  I am using 5.0.6-SNAPSHOT

 Angelo, what version are you using?

 Thanks in advance.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
 Josh Canfield
 Sent: Thursday, October 18, 2007 12:36
 To: Tapestry users
 Subject: Re: Templates and t:body

 Did you create the Header.java?

 On 10/18/07, Angelo Chen [EMAIL PROTECTED] wrote:
 
 
  Hi Jonathan,
 
  I tried your approach, but does not work, here is my steps:
 
  1. create a Header.html in component directory, it has only one
  line:h2hi my heading/h2 2. I use it in my start.html:
 
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
 titleStart Page/title
  /head
  body
  h1Start Page/h1
 t:Header /
  /body
  /html
 
  It complains:Unable to resolve component type 'Header' to a component
  class name.
 
  Anything I'm missing here? Thanks,
  A.C.
 
 
  Jonathan Barker wrote:
  
   Sorry, I only answered half of your question.
  
   Including your standard header into hello.tml would be something like:
  
   html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
   head
   titleMy Tapestry Application/title
   /head
   body
   t:header /
   My Page Specific Content
   /body
   /html
  
  
   -Original Message-
   From: Heck, Bob [mailto:[EMAIL PROTECTED]
   Sent: Thursday, October 18, 2007 12:27 PM
   To: Tapestry users
   Subject: RE: Templates and t:body
  
   Or, maybe I should just start at the top.
  
   I have a header that I want to display on every page.  That header
   html
   (tml) markup is stored in the file header.tml
  
   How do I include this in another file, say hello.tml?  What is the
  syntax
   and component usage?
  
  
  
   -Original Message-
   From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
   Sent: Thursday, October 18, 2007 12:17
   To: Tapestry users
   Subject: Re: Templates and t:body
  
   On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED]
 wrote:
  
So, how does layout.tml know to use specific.tml to fill in the
t:body/ tag?  Does it have to be injected somehow?  Where does
it get a reference? How is this done?
  
   t:body just renders whatever was put inside your t:layout tag.
   ;)
  The
   specific page uses the layout, not the inverse.
  
  
   --
   Thiago H. de Paula Figueiredo
   Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia
   da Informação Ltda.
   http://www.eteg.com.br
  
   ---
   -- To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
   ---
   -- To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
   
   - To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Templates-and-t%3Abody-tf4647900.html#a13279344
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 --
 TheDailyTube.com. Sign up and get the best new videos on the internet
 delivered fresh to your inbox.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind


RE: Templates and t:body

2007-10-19 Thread Heck, Bob
Ok Found the answer as to why this was not working. 

This may be trivial to seasoned users, but a hard catch for a newbie.

For components, such as the Header we have been talking about, the .java file 
AND the .tml file need to both reside in the components package.  I had been 
putting the .tml file in the webroot and the .java for the component in 
components.   Moved the .tml to components package and it works now.

Bob

 

-Original Message-
From: Heck, Bob [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 19, 2007 19:33
To: Tapestry users
Subject: RE: Templates and t:body

Ok, still have a problem.  No error, just no header rendered.

---
Here is my Header.java file:

package try.tapestry.components;

public class Header {

public Header()
{

}
} 


Here is my Header.tml file:

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
body
h1This is a header/h1
/body
/html


Here is my Start.tml

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/ 
titleHello World Title/title /head body t:Header / Hello world. Start.
/body
/html

---
Here is my Start.java

package try.tapestry.pages;

public class Start {

public Start ()
{

}
}

-
Here is the output when rendered (no header was inserted, just ignored.  No 
errors.):

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;htmlheadlink 
href=/assets/tapestry/default.css rel=stylesheet type=text/cssmeta 
content=text/html; charset=ISO-8859-1 http-equiv=Content-TypetitleHello 
World Title/title/headbody

Hello world. Start.
/body/html
-


Any help is appreciated.  I MUST be missing something so simple.

Bob


-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
Sent: Friday, October 19, 2007 18:20
To: Tapestry users
Subject: Re: Templates and t:body

Tapestry mandates a certain organization to your classes.

If you page class is org.example.pages.MyPage then your component class (here, 
Header) must be  org.example.components.Header.  The .pages. and .components. 
part is very specific to Tapestry, hard-wired into the framework.  Those are 
packages that Tapestry scans at startup to locate page and component classes, 
and such classes must exist there (for Tapestry to perform runtime code 
transformation and hot class reloading).

On 10/19/07, Heck, Bob [EMAIL PROTECTED] wrote:

 I created the Header.java and I am getting the same error:
 Unable to resolve 'Header' to a component class name

 Here is my Header.java

 public class Header {

 public Header()
 {

 }
 }

 and my Header.tml

 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 h1This is a header/h1
 /html



 Just to make sure, I dug into my classes files that were deployed and 
 the Header.class is there.

 Josh, what version of Tapestry are you using?  I am using 
 5.0.6-SNAPSHOT

 Angelo, what version are you using?

 Thanks in advance.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf 
 Of Josh Canfield
 Sent: Thursday, October 18, 2007 12:36
 To: Tapestry users
 Subject: Re: Templates and t:body

 Did you create the Header.java?

 On 10/18/07, Angelo Chen [EMAIL PROTECTED] wrote:
 
 
  Hi Jonathan,
 
  I tried your approach, but does not work, here is my steps:
 
  1. create a Header.html in component directory, it has only one 
  line:h2hi my heading/h2 2. I use it in my start.html:
 
  html
  xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
 titleStart Page/title
  /head
  body
  h1Start Page/h1
 t:Header /
  /body
  /html
 
  It complains:Unable to resolve component type 'Header' to a 
  component class name.
 
  Anything I'm missing here? Thanks,
  A.C.
 
 
  Jonathan Barker wrote:
  
   Sorry, I only answered half of your question.
  
   Including your standard header into hello.tml would be something like:
  
   html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
   head
   titleMy Tapestry Application/title
   /head
   body
   t:header /
   My Page Specific Content
   /body
   /html
  
  
   -Original Message-
   From: Heck, Bob [mailto:[EMAIL PROTECTED]
   Sent: Thursday, October 18, 2007 12:27 PM
   To: Tapestry users
   Subject: RE: Templates and t:body
  
   Or, maybe I should just start at the top.
  
   I have a header that I want to display on every page.  That 
   header html
   (tml) markup

RE: Templates and t:body

2007-10-18 Thread Jonathan Barker
Bob,

The documentation is correct, but requires some getting used to.

A layout component is more of a design pattern (like the Border in T4).  It
is designed to be wrapped around something.  That something appears where
you see t:body /

The naming is by convention.  I'm still using a T4 convention, so I actually
use a t:border / rather than a t:layout /, because I created a component
named Border rather than one named Layout.  You could call it anything you
want!

When you use t:layout /, in your page, it's like saying, Take everything
inside of this tag and put in into Layout where you see t:body /.

I hope that helps.

Jonathan


 -Original Message-
 From: Heck, Bob [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 11:37 AM
 To: Tapestry users
 Subject: Templates and t:body
 
 I am really confused and in need of some clarification.
 
 The templates documentation for Tapestry 5
 (http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/templa
 tes.html) shows this (direct copy/paste):
 
 
 The following example is a Layout component, that adds basic HTML
 elements around the page specific content:
 
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
 titleMy Tapestry Application/title
 /head
 body
 t:body/
 /body
 /html
 
 A page would use this component as follow:
 
 t:layout
 xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 
   My Page Specific Content
 
 /t:layout
 
 When the page renders, the page's template and the Border component's
 template are merged together:
 
 html
   head
 titleMy Tapestry Application/title
   /head
   body
 My Page Specific Content
   /body
 /html
 ==
 
 
 1.  I thought a layout component should start with t:layout, someone
 please clarify if the first block is actually a layout component.
 
 2.  I will assume (not sure this is correct, though) that the
 introductory sentences are reversed and the layout component is actually
 the second block, i.e.:
 
 t:layout
 xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 
   My Page Specific Content
 
 /t:layout
 
 
 And, the page is actually the first block, i.e.:
 
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
 titleMy Tapestry Application/title
 /head
 body
 t:body/
 /body
 /html
 
 
 3.  Given that #2 assumption is correct, I still do not understand how
 the page inserts the layout template in the body.  There is no id given
 to the template, so where is the linking between the two? Is there a
 specific name given to the template file?  If so, it is not explained or
 even mentioned.
 
 4.  The sentence When the page renders, the page's template and the
 Border component's template are merged together: is confusing as well,
 as I read elsewhere that there is no Border component in T5.
 
 
 Am I missing something very basic here?  I just can't seem to get a
 handle.  All I want to do is include menus/navigation in other pages,
 does not seem like it should be that hard.
 
 Thanks in advance for your help.
 
 Bob
 
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Templates and t:body

2007-10-18 Thread Heck, Bob
Thanks for the reply.

Ok, the page specific content:

 t:layout
 xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 
   My Page Specific Content
 
 /t:layout 

is stored in its own .tml file, right?  Call it specific.tml


Now, the layout template, as specified by the documentation, is

 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
 titleMy Tapestry Application/title
 /head
 body
 t:body/
 /body
 /html

and that is stored I its own .tml file, call it layout.tml


So, how does layout.tml know to use specific.tml to fill in the
t:body/ tag?  Does it have to be injected somehow?  Where does it get
a reference? How is this done?




-Original Message-
From: Jonathan Barker [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 10:56
To: 'Tapestry users'
Subject: RE: Templates and t:body

Bob,

The documentation is correct, but requires some getting used to.

A layout component is more of a design pattern (like the Border in T4).
It is designed to be wrapped around something.  That something appears
where you see t:body /

The naming is by convention.  I'm still using a T4 convention, so I
actually use a t:border / rather than a t:layout /, because I
created a component named Border rather than one named Layout.  You
could call it anything you want!

When you use t:layout /, in your page, it's like saying, Take
everything inside of this tag and put in into Layout where you see
t:body /.

I hope that helps.

Jonathan


 -Original Message-
 From: Heck, Bob [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 11:37 AM
 To: Tapestry users
 Subject: Templates and t:body
 
 I am really confused and in need of some clarification.
 
 The templates documentation for Tapestry 5 
 (http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/temp
 la
 tes.html) shows this (direct copy/paste):
 
 
 The following example is a Layout component, that adds basic HTML 
 elements around the page specific content:
 
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
 titleMy Tapestry Application/title
 /head
 body
 t:body/
 /body
 /html
 
 A page would use this component as follow:
 
 t:layout
 xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 
   My Page Specific Content
 
 /t:layout
 
 When the page renders, the page's template and the Border component's 
 template are merged together:
 
 html
   head
 titleMy Tapestry Application/title
   /head
   body
 My Page Specific Content
   /body
 /html
 ==
 
 
 1.  I thought a layout component should start with t:layout, someone 
 please clarify if the first block is actually a layout component.
 
 2.  I will assume (not sure this is correct, though) that the 
 introductory sentences are reversed and the layout component is 
 actually the second block, i.e.:
 
 t:layout
 xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 
   My Page Specific Content
 
 /t:layout
 
 
 And, the page is actually the first block, i.e.:
 
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
 titleMy Tapestry Application/title
 /head
 body
 t:body/
 /body
 /html
 
 
 3.  Given that #2 assumption is correct, I still do not understand how

 the page inserts the layout template in the body.  There is no id 
 given to the template, so where is the linking between the two? Is 
 there a specific name given to the template file?  If so, it is not 
 explained or even mentioned.
 
 4.  The sentence When the page renders, the page's template and the 
 Border component's template are merged together: is confusing as 
 well, as I read elsewhere that there is no Border component in T5.
 
 
 Am I missing something very basic here?  I just can't seem to get a 
 handle.  All I want to do is include menus/navigation in other pages, 
 does not seem like it should be that hard.
 
 Thanks in advance for your help.
 
 Bob
 
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Templates and t:body

2007-10-18 Thread Thiago H de Paula Figueiredo

On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:


So, how does layout.tml know to use specific.tml to fill in the
t:body/ tag?  Does it have to be injected somehow?  Where does it get
a reference? How is this done?


t:body just renders whatever was put inside your t:layout tag. ;)
The specific page uses the layout, not the inverse.


--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Templates and t:body

2007-10-18 Thread Angelo Chen

Something interesting: if t:body/t:body you will get some runtime
warning, but t:body / everything's fine.


Thiago H. de Paula Figueiredo wrote:
 
 On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:
 
 So, how does layout.tml know to use specific.tml to fill in the
 t:body/ tag?  Does it have to be injected somehow?  Where does it get
 a reference? How is this done?
 
 t:body just renders whatever was put inside your t:layout tag. ;)
 The specific page uses the layout, not the inverse.
 
 
 -- 
 Thiago H. de Paula Figueiredo
 Desenvolvedor, Instrutor e Consultor de Tecnologia
 Eteg Tecnologia da Informação Ltda.
 http://www.eteg.com.br
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Templates-and-t%3Abody-tf4647900.html#a13278246
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Templates and t:body

2007-10-18 Thread Matheus Eduardo Machado Moreira
Hi, Bob.

When the specific.tml page is requested, Tapestry asks its components to
render themselves to generate the response. So, when t:layout on
specific.tml is asked to generate content, it knows that its body is My
Page Specific Content. The content written by the component is:

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head
titleMy Tapestry Application/title
/head
body
!-- my comment: t:body is replaced by the actual body --
My Page Specific Content
/body
/html

So, you don't have to inject anything. The component knows what its body
is and know that it must be placed where t:body appears.

Atenciosamente,

Matheus Eduardo Machado Moreira
[EMAIL PROTECTED]

Violence is the last refuge of the incompetent.
Salvor Hardin (The Foundation, Isaac Asimov)

2007/10/18, Heck, Bob [EMAIL PROTECTED]:

 Thanks for the reply.

 Ok, the page specific content:

 t:layout
 xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

My Page Specific Content

 /t:layout

 is stored in its own .tml file, right?  Call it specific.tml


 Now, the layout template, as specified by the documentation, is

 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
  titleMy Tapestry Application/title
  /head
  body
  t:body/
  /body
 /html

 and that is stored I its own .tml file, call it layout.tml


 So, how does layout.tml know to use specific.tml to fill in the
 t:body/ tag?  Does it have to be injected somehow?  Where does it get
 a reference? How is this done?




 -Original Message-
 From: Jonathan Barker [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 10:56
 To: 'Tapestry users'
 Subject: RE: Templates and t:body

 Bob,

 The documentation is correct, but requires some getting used to.

 A layout component is more of a design pattern (like the Border in T4).
 It is designed to be wrapped around something.  That something appears
 where you see t:body /

 The naming is by convention.  I'm still using a T4 convention, so I
 actually use a t:border / rather than a t:layout /, because I
 created a component named Border rather than one named Layout.  You
 could call it anything you want!

 When you use t:layout /, in your page, it's like saying, Take
 everything inside of this tag and put in into Layout where you see
 t:body /.

 I hope that helps.

 Jonathan


  -Original Message-
  From: Heck, Bob [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 18, 2007 11:37 AM
  To: Tapestry users
  Subject: Templates and t:body
 
  I am really confused and in need of some clarification.
 
  The templates documentation for Tapestry 5
  (http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/temp
  la
  tes.html) shows this (direct copy/paste):
 
  
  The following example is a Layout component, that adds basic HTML
  elements around the page specific content:
 
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
  titleMy Tapestry Application/title
  /head
  body
  t:body/
  /body
  /html
 
  A page would use this component as follow:
 
  t:layout
  xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 
My Page Specific Content
 
  /t:layout
 
  When the page renders, the page's template and the Border component's
  template are merged together:
 
  html
head
  titleMy Tapestry Application/title
/head
body
  My Page Specific Content
/body
  /html
  ==
 
 
  1.  I thought a layout component should start with t:layout, someone
  please clarify if the first block is actually a layout component.
 
  2.  I will assume (not sure this is correct, though) that the
  introductory sentences are reversed and the layout component is
  actually the second block, i.e.:
 
  t:layout
  xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 
My Page Specific Content
 
  /t:layout
 
 
  And, the page is actually the first block, i.e.:
 
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
  titleMy Tapestry Application/title
  /head
  body
  t:body/
  /body
  /html
 
 
  3.  Given that #2 assumption is correct, I still do not understand how

  the page inserts the layout template in the body.  There is no id
  given to the template, so where is the linking between the two? Is
  there a specific name given to the template file?  If so, it is not
  explained or even mentioned.
 
  4.  The sentence When the page renders, the page's template and the
  Border component's template are merged together: is confusing as
  well, as I read elsewhere that there is no Border component in T5.
 
 
  Am I missing something very basic here?  I just can't seem to get a
  handle.  All I want to do is include menus/navigation in other pages,
  does not seem like it should

RE: Templates and t:body

2007-10-18 Thread Heck, Bob
t:layout and t:body are in two separate files.  How does that work?

 

-Original Message-
From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 12:17
To: Tapestry users
Subject: Re: Templates and t:body

On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:

 So, how does layout.tml know to use specific.tml to fill in the 
 t:body/ tag?  Does it have to be injected somehow?  Where does it 
 get a reference? How is this done?

t:body just renders whatever was put inside your t:layout tag. ;) The 
specific page uses the layout, not the inverse.


--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da 
Informação Ltda.
http://www.eteg.com.br

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Templates and t:body

2007-10-18 Thread Heck, Bob
Or, maybe I should just start at the top.

I have a header that I want to display on every page.  That header html (tml) 
markup is stored in the file header.tml 

How do I include this in another file, say hello.tml?  What is the syntax and 
component usage?



-Original Message-
From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 12:17
To: Tapestry users
Subject: Re: Templates and t:body

On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:

 So, how does layout.tml know to use specific.tml to fill in the 
 t:body/ tag?  Does it have to be injected somehow?  Where does it 
 get a reference? How is this done?

t:body just renders whatever was put inside your t:layout tag. ;) The 
specific page uses the layout, not the inverse.


--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da 
Informação Ltda.
http://www.eteg.com.br

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Templates and t:body

2007-10-18 Thread Jonathan Barker
Sorry, I only answered half of your question.

Including your standard header into hello.tml would be something like:

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head
titleMy Tapestry Application/title
/head
body
  t:header /
My Page Specific Content
/body
/html


 -Original Message-
 From: Heck, Bob [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 12:27 PM
 To: Tapestry users
 Subject: RE: Templates and t:body
 
 Or, maybe I should just start at the top.
 
 I have a header that I want to display on every page.  That header html
 (tml) markup is stored in the file header.tml
 
 How do I include this in another file, say hello.tml?  What is the syntax
 and component usage?
 
 
 
 -Original Message-
 From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 12:17
 To: Tapestry users
 Subject: Re: Templates and t:body
 
 On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:
 
  So, how does layout.tml know to use specific.tml to fill in the
  t:body/ tag?  Does it have to be injected somehow?  Where does it
  get a reference? How is this done?
 
 t:body just renders whatever was put inside your t:layout tag. ;) The
 specific page uses the layout, not the inverse.
 
 
 --
 Thiago H. de Paula Figueiredo
 Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da
 Informação Ltda.
 http://www.eteg.com.br
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Templates and t:body

2007-10-18 Thread Jonathan Barker

I should type faster (and stop eating).  Lots of good responses to your
questions.

If all you want to do is include a header, then you don't need to use the
layout pattern, so header.tml can be something like:

h1some standard header/h1

And that's it.

The layout pattern is handy if you want to be able to have things like
menus, or standard CSS files, and change the arrangement of your application
without modifying every page.  For example, you could move from a menu on
the left to a menu across the top by only changing your Layout component.  I
tend to us the Layout pattern for the long-term flexibility.

Jonathan



 -Original Message-
 From: Heck, Bob [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 12:27 PM
 To: Tapestry users
 Subject: RE: Templates and t:body
 
 Or, maybe I should just start at the top.
 
 I have a header that I want to display on every page.  That header html
 (tml) markup is stored in the file header.tml
 
 How do I include this in another file, say hello.tml?  What is the syntax
 and component usage?
 
 
 
 -Original Message-
 From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 12:17
 To: Tapestry users
 Subject: Re: Templates and t:body
 
 On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:
 
  So, how does layout.tml know to use specific.tml to fill in the
  t:body/ tag?  Does it have to be injected somehow?  Where does it
  get a reference? How is this done?
 
 t:body just renders whatever was put inside your t:layout tag. ;) The
 specific page uses the layout, not the inverse.
 
 
 --
 Thiago H. de Paula Figueiredo
 Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da
 Informação Ltda.
 http://www.eteg.com.br
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Templates and t:body

2007-10-18 Thread Marcus
Hi Bob,

Header.tml:
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head/head
body

t:body/   !--  This tag will render your Hello.tml --

/body
/html


Hello.tml:
t:Header xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
Hello Word!
/t:Header


Marcus


RE: Templates and t:body

2007-10-18 Thread Angelo Chen

Hi Jonathan,

I tried your approach, but does not work, here is my steps:

1. create a Header.html in component directory, it has only one line:h2hi
my heading/h2
2. I use it in my start.html:

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head
titleStart Page/title
/head
body
h1Start Page/h1
t:Header /
/body
/html

It complains:Unable to resolve component type 'Header' to a component class
name.

Anything I'm missing here? Thanks,
A.C.


Jonathan Barker wrote:
 
 Sorry, I only answered half of your question.
 
 Including your standard header into hello.tml would be something like:
 
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
 titleMy Tapestry Application/title
 /head
 body
 t:header /
 My Page Specific Content
 /body
 /html
 
 
 -Original Message-
 From: Heck, Bob [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 12:27 PM
 To: Tapestry users
 Subject: RE: Templates and t:body
 
 Or, maybe I should just start at the top.
 
 I have a header that I want to display on every page.  That header html
 (tml) markup is stored in the file header.tml
 
 How do I include this in another file, say hello.tml?  What is the syntax
 and component usage?
 
 
 
 -Original Message-
 From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 12:17
 To: Tapestry users
 Subject: Re: Templates and t:body
 
 On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:
 
  So, how does layout.tml know to use specific.tml to fill in the
  t:body/ tag?  Does it have to be injected somehow?  Where does it
  get a reference? How is this done?
 
 t:body just renders whatever was put inside your t:layout tag. ;) The
 specific page uses the layout, not the inverse.
 
 
 --
 Thiago H. de Paula Figueiredo
 Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da
 Informação Ltda.
 http://www.eteg.com.br
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Templates-and-t%3Abody-tf4647900.html#a13279344
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Templates and t:body

2007-10-18 Thread Josh Canfield
Hi Bob,

Think of the element t:layout as a reference to your component, like
calling a method. The same goes for using t:textfield or any of the other
components, they just point to a component to run at that point of the page.
You can think of the contents of that element as an intrinsic parameter to
the component. The t:body element processes those contents, invoking any
components that might be contained. This allows you to choose where in your
layout html those contents are rendered.

A simpler, but related component might be one that rendered it's contents in
a box with a black border. You could create the box component like this:

Box.java (empty but currently required )
Box.tml
div style=border:thin black solid
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 t:body/
/div

Now within your other pages/components you could use it like this:

t:boxThis is in a box/t:box


I hope this helps...
Josh


On 10/18/07, Heck, Bob [EMAIL PROTECTED] wrote:

 t:layout and t:body are in two separate files.  How does that work?



 -Original Message-
 From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 12:17
 To: Tapestry users
 Subject: Re: Templates and t:body

 On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:

  So, how does layout.tml know to use specific.tml to fill in the
  t:body/ tag?  Does it have to be injected somehow?  Where does it
  get a reference? How is this done?

 t:body just renders whatever was put inside your t:layout tag. ;) The
 specific page uses the layout, not the inverse.


 --
 Thiago H. de Paula Figueiredo
 Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da
 Informação Ltda.
 http://www.eteg.com.br

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: Templates and t:body

2007-10-18 Thread Josh Canfield
Did you create the Header.java?

On 10/18/07, Angelo Chen [EMAIL PROTECTED] wrote:


 Hi Jonathan,

 I tried your approach, but does not work, here is my steps:

 1. create a Header.html in component directory, it has only one
 line:h2hi
 my heading/h2
 2. I use it in my start.html:

 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
titleStart Page/title
 /head
 body
 h1Start Page/h1
t:Header /
 /body
 /html

 It complains:Unable to resolve component type 'Header' to a component
 class
 name.

 Anything I'm missing here? Thanks,
 A.C.


 Jonathan Barker wrote:
 
  Sorry, I only answered half of your question.
 
  Including your standard header into hello.tml would be something like:
 
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
  titleMy Tapestry Application/title
  /head
  body
  t:header /
  My Page Specific Content
  /body
  /html
 
 
  -Original Message-
  From: Heck, Bob [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 18, 2007 12:27 PM
  To: Tapestry users
  Subject: RE: Templates and t:body
 
  Or, maybe I should just start at the top.
 
  I have a header that I want to display on every page.  That header html
  (tml) markup is stored in the file header.tml
 
  How do I include this in another file, say hello.tml?  What is the
 syntax
  and component usage?
 
 
 
  -Original Message-
  From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 18, 2007 12:17
  To: Tapestry users
  Subject: Re: Templates and t:body
 
  On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:
 
   So, how does layout.tml know to use specific.tml to fill in the
   t:body/ tag?  Does it have to be injected somehow?  Where does it
   get a reference? How is this done?
 
  t:body just renders whatever was put inside your t:layout tag. ;)
 The
  specific page uses the layout, not the inverse.
 
 
  --
  Thiago H. de Paula Figueiredo
  Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da
  Informação Ltda.
  http://www.eteg.com.br
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Templates-and-t%3Abody-tf4647900.html#a13279344
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


RE: Templates and t:body

2007-10-18 Thread Jonathan Barker

It worked for me.  Make sure you have created a Header class in your
components package.

My .java files are bare class declarations, so here are my .tml files:

Hello.tml

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
headtitleSome Title/title/head
body
t:header /
/body
/html

Header.tml

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
H1 test header/H1
/html

The resulting page source:

html
headlink href=/assets/tapestry/default.css rel=stylesheet
type=text/csstitleSome Title/title/head
body
html
H1 test header/H1
/html
/body
/html


It also works whether you use t:header or t:Header.



 -Original Message-
 From: Angelo Chen [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 18, 2007 1:19 PM
 To: users@tapestry.apache.org
 Subject: RE: Templates and t:body
 
 
 Hi Jonathan,
 
 I tried your approach, but does not work, here is my steps:
 
 1. create a Header.html in component directory, it has only one
 line:h2hi
 my heading/h2
 2. I use it in my start.html:
 
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 head
 titleStart Page/title
 /head
 body
 h1Start Page/h1
 t:Header /
 /body
 /html
 
 It complains:Unable to resolve component type 'Header' to a component
 class
 name.
 
 Anything I'm missing here? Thanks,
 A.C.
 
 
 Jonathan Barker wrote:
 
  Sorry, I only answered half of your question.
 
  Including your standard header into hello.tml would be something like:
 
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  head
  titleMy Tapestry Application/title
  /head
  body
t:header /
  My Page Specific Content
  /body
  /html
 
 
  -Original Message-
  From: Heck, Bob [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 18, 2007 12:27 PM
  To: Tapestry users
  Subject: RE: Templates and t:body
 
  Or, maybe I should just start at the top.
 
  I have a header that I want to display on every page.  That header html
  (tml) markup is stored in the file header.tml
 
  How do I include this in another file, say hello.tml?  What is the
 syntax
  and component usage?
 
 
 
  -Original Message-
  From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 18, 2007 12:17
  To: Tapestry users
  Subject: Re: Templates and t:body
 
  On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:
 
   So, how does layout.tml know to use specific.tml to fill in the
   t:body/ tag?  Does it have to be injected somehow?  Where does it
   get a reference? How is this done?
 
  t:body just renders whatever was put inside your t:layout tag. ;)
 The
  specific page uses the layout, not the inverse.
 
 
  --
  Thiago H. de Paula Figueiredo
  Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da
  Informação Ltda.
  http://www.eteg.com.br
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 View this message in context: http://www.nabble.com/Templates-and-
 t%3Abody-tf4647900.html#a13279344
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Templates and t:body

2007-10-18 Thread Nick Westgate

In Tapestry (all versions) when you use the word include to
describe something, you should be thinking about components.

Either the header goes in your Border/Layout component, or you
make a header component which gets rendered in a Border.

The documentation for Tapestry's special t:body element is here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html

Also, regarding your earlier confusion:

 1.  I thought a layout component should start with t:layout, someone
 please clarify if the first block is actually a layout component.

Imagine you were writing a textfield component with its own template.
In the component's html/tml template, would you start with t:textfield?
No. That's almost like recursion: a Textfield starts with a Textfield?

In any template, t:componentName invokes the _use_ of componentName.

Cheers,
Nick.


Heck, Bob wrote:

Or, maybe I should just start at the top.

I have a header that I want to display on every page.  That header html (tml) markup is stored in the file header.tml 


How do I include this in another file, say hello.tml?  What is the syntax and 
component usage?



-Original Message-
From: Thiago H de Paula Figueiredo [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 18, 2007 12:17

To: Tapestry users
Subject: Re: Templates and t:body

On Thu, 18 Oct 2007 13:05:48 -0300, Heck, Bob [EMAIL PROTECTED] wrote:

So, how does layout.tml know to use specific.tml to fill in the 
t:body/ tag?  Does it have to be injected somehow?  Where does it 
get a reference? How is this done?


t:body just renders whatever was put inside your t:layout tag. ;) The 
specific page uses the layout, not the inverse.


--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da 
Informação Ltda.
http://www.eteg.com.br

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]