You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2009/05/29 15:45:55 UTC

t5: previewability

Hi,

I'm going to start a new project and I'd like to use approaches that will
make tml file previewable, I know, instead of <t:pagelink ...> I'd rather
use  , is there any other approaches? one thing I find it difficult is, I
have a layout component and css is included in the layout component, and all
the pages in the project 'inherited' from that layout component, it is
previewable, but the css is not included and the end result of previewing
does not really look good, any idea how to make css in the layout also
available to the 'inherited' pages? thanks,

Angelo
-- 
View this message in context: http://www.nabble.com/t5%3A-previewability-tp23780335p23780335.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: t5: previewability

Posted by Onno Scheffers <on...@piraya.nl>.
If you're going to start a new project you can use Tapestry 5.1.
A new special tag was introduced to do precisely what you want: <t:content>.

There's more information in the Tapestry documentation:
http://tapestry.apache.org/tapestry5.1/guide/templates.html

Simple example:
- Border template:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
   <head>
      [...]
   </head>
   <body>
      [...]
      <t:body />
      [...]
   </body>
</html>

- Page template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
   <head>
      [...]
   </head>
   <body>
      [...]
      <t:content>
         Page content goes here!
      </t:content>
      [...]
   </body>
</html>

regards,

Onno


On Fri, May 29, 2009 at 3:45 PM, Angelo Chen <an...@yahoo.com.hk>wrote:

>
> Hi,
>
> I'm going to start a new project and I'd like to use approaches that will
> make tml file previewable, I know, instead of <t:pagelink ...> I'd rather
> use  , is there any other approaches? one thing I find it difficult is, I
> have a layout component and css is included in the layout component, and
> all
> the pages in the project 'inherited' from that layout component, it is
> previewable, but the css is not included and the end result of previewing
> does not really look good, any idea how to make css in the layout also
> available to the 'inherited' pages? thanks,
>
> Angelo
> --
> View this message in context:
> http://www.nabble.com/t5%3A-previewability-tp23780335p23780335.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: t5: previewability

Posted by Angelo Chen <an...@yahoo.com.hk>.
hi,

good idea, will give 5.1 a try, thanks.


Onno Scheffers-3 wrote:
> 
>>
>> instead of <t:pagelink ...> I'd rather use
> 
> 
> You can do that as well:
>  SomePage.tml Click me 
> 
> You're telling Tapestry to bind the link to a component with id myLink.
> You
> should setup the component and configure it in your Java code:
> @Component(parameters = { "page=Home" })
> private PageLink myLink;
> 
> The only thing the web-designers need to keep in mind is that they should
> leave the t:id attributes in your template.
> 
> 
> regards,
> 
> Onno
> 
> 

-- 
View this message in context: http://www.nabble.com/t5%3A-previewability-tp23780335p23783160.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: t5: previewability

Posted by Onno Scheffers <on...@piraya.nl>.
>
> instead of <t:pagelink ...> I'd rather use


You can do that as well:
<a href="SomePage.tml" t:id="myLink">Click me</a>

You're telling Tapestry to bind the link to a component with id myLink. You
should setup the component and configure it in your Java code:
@Component(parameters = { "page=Home" })
private PageLink myLink;

The only thing the web-designers need to keep in mind is that they should
leave the t:id attributes in your template.


regards,

Onno

Re: t5: previewability

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
In this mailing list, a discussion exactly about this has just happened. ;)

-- 
Thiago

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