You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoff Callender <ge...@gmail.com> on 2007/11/12 13:06:49 UTC

T5 Previewable pages

One of T4's great selling points was that the templates could be made  
previewable in a browser or WYSIWYG tool.  Is this possible in T5?

Geoff



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


Re: T5 Previewable pages

Posted by Joshua Jackson <jo...@gmail.com>.
Of course. It's even better :)

On 11/12/07, Geoff Callender <ge...@gmail.com> wrote:
> One of T4's great selling points was that the templates could be made
> previewable in a browser or WYSIWYG tool.  Is this possible in T5?
>
> Geoff

-- 
What you want today, may not exist tommorrow

Blog: http://joshuajava.wordpress.com/

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


Re: T5 Previewable pages

Posted by Nick Westgate <ni...@key-planning.co.jp>.
$Remove$ is not yet implemented.

You can accomplish what you're trying to do with Any:
http://wiki.apache.org/tapestry/Tapestry5AnyComponent

In that case the runtime href will be prefixed with "t:" to
override the (informal) additional href used for preview.

The cleaner option is to write your own component e.g. Image:
http://wiki.apache.org/tapestry/Tapestry5ImageComponent

Cheers,
Nick.


Geoff Callender wrote:
> I was thinking particularly of stylesheet handling.  In T4 you could put 
> $remove$ around a stylesheet that used a relative path.  The approach 
> I'm taking in T5 is this kind of thing:
> 
> <head>
>      <link rel="stylesheet" type="text/css" href="../../css/mystyle.css"/>
>     <link rel="stylesheet" type="text/css" href="${stylesheet}"/>
> </head>
> 
> The first link makes it previewable, but it might not be valid at 
> runtime eg. if the template was in WEB-INF/classes instead of in the web 
> context.  At runtime the second link would become valid so you'd cascade 
> to it.  The java for it could be:
> 
>     @Inject
>     @Path("context:css/mystyle.css")
>     private Asset _stylesheet;
> 
> Is there a flaw in this?  Perhaps there's a better way?
> 
> Cheers,
> 
> Geoff
> 
> On 12/11/2007, at 11:26 PM, Filip S. Adamsen wrote:
> 
>> That is indeed possible:
>> http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html
>>
>> See "Invisible Instrumentation" at the bottom.
>>
>> -Filip
>>
>> Geoff Callender skrev:
>>> One of T4's great selling points was that the templates could be made 
>>> previewable in a browser or WYSIWYG tool.  Is this possible in T5?
>>> Geoff
>>> ---------------------------------------------------------------------
>>> 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
>>
> 
> 

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


Re: T5 Previewable pages

Posted by Hugo Palma <hu...@gmail.com>.
I think that should work.

Howard has already said in other threads that he plans to support the 
$remove$ and $content$ notations from T4 in T5. It's just a matter of 
time until that happens.

Geoff Callender wrote:
> I was thinking particularly of stylesheet handling.  In T4 you could 
> put $remove$ around a stylesheet that used a relative path.  The 
> approach I'm taking in T5 is this kind of thing:
>
> <head>
>      <link rel="stylesheet" type="text/css" 
> href="../../css/mystyle.css"/>
>     <link rel="stylesheet" type="text/css" href="${stylesheet}"/>
> </head>
>
> The first link makes it previewable, but it might not be valid at 
> runtime eg. if the template was in WEB-INF/classes instead of in the 
> web context.  At runtime the second link would become valid so you'd 
> cascade to it.  The java for it could be:
>
>     @Inject
>     @Path("context:css/mystyle.css")
>     private Asset _stylesheet;
>
> Is there a flaw in this?  Perhaps there's a better way?
>
> Cheers,
>
> Geoff
>
> On 12/11/2007, at 11:26 PM, Filip S. Adamsen wrote:
>
>> That is indeed possible:
>> http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html
>>
>> See "Invisible Instrumentation" at the bottom.
>>
>> -Filip
>>
>> Geoff Callender skrev:
>>> One of T4's great selling points was that the templates could be 
>>> made previewable in a browser or WYSIWYG tool.  Is this possible in T5?
>>> Geoff
>>> ---------------------------------------------------------------------
>>> 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
>>
>
>

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


Re: T5 Previewable pages

Posted by Geoff Callender <ge...@gmail.com>.
Nice one - Remove works like a charm.

On 13/11/2007, at 6:19 AM, Shing Hing Man wrote:

> The following is my implementation of a
> remove component.
>
> Put the following in the component directory:
>
> public class Remove {
>
> 	
> 	protected boolean beginRender(){
> 		return false;
> 	}
> 	
> }
>
> Usage :
>
> <h1 t:type="remove">Fred</h1>
>
>
> Shing
>
> --- Geoff Callender
> <ge...@gmail.com> wrote:
>
>> I was thinking particularly of stylesheet handling.
>> In T4 you could
>> put $remove$ around a stylesheet that used a
>> relative path.  The
>> approach I'm taking in T5 is this kind of thing:
>>
>> <head>
>>  	<link rel="stylesheet" type="text/css"
>> href="../../css/mystyle.css"/>
>> 	<link rel="stylesheet" type="text/css"
>> href="${stylesheet}"/>
>> </head>
>>
>> The first link makes it previewable, but it might
>> not be valid at
>> runtime eg. if the template was in WEB-INF/classes
>> instead of in the
>> web context.  At runtime the second link would
>> become valid so you'd
>> cascade to it.  The java for it could be:
>>
>> 	@Inject
>> 	@Path("context:css/mystyle.css")
>> 	private Asset _stylesheet;
>>
>> Is there a flaw in this?  Perhaps there's a better
>> way?
>>
>> Cheers,
>>
>> Geoff
>>
>> On 12/11/2007, at 11:26 PM, Filip S. Adamsen wrote:
>>
>>> That is indeed possible:
>>>
>>
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/
>>
>>> templates.html
>>>
>>> See "Invisible Instrumentation" at the bottom.
>>>
>>> -Filip
>>>
>>> Geoff Callender skrev:
>>>> One of T4's great selling points was that the
>> templates could be
>>>> made previewable in a browser or WYSIWYG tool.
>> Is this possible in
>>>> T5?
>>>> Geoff
>>>>
>>
> ---------------------------------------------------------------------
>>>> 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
>>>
>>
>>
>
>
> Home page : http://www.lombok.demon.co.uk/
>
>
>
>      ___________________________________________________________
> Want ideas for reducing your carbon footprint? Visit Yahoo! For  
> Good  http://uk.promotions.yahoo.com/forgood/environment.html
>
> ---------------------------------------------------------------------
> 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


Re: T5 Previewable pages

Posted by Shing Hing Man <ma...@yahoo.com>.
The following is my implementation of a 
remove component.

Put the following in the component directory:

public class Remove {

	
	protected boolean beginRender(){
		return false;
	}
	
}

Usage :

<h1 t:type="remove">Fred</h1>


Shing 

--- Geoff Callender
<ge...@gmail.com> wrote:

> I was thinking particularly of stylesheet handling. 
> In T4 you could  
> put $remove$ around a stylesheet that used a
> relative path.  The  
> approach I'm taking in T5 is this kind of thing:
> 
> <head>
>   	<link rel="stylesheet" type="text/css"
> href="../../css/mystyle.css"/>
> 	<link rel="stylesheet" type="text/css"
> href="${stylesheet}"/>
> </head>
> 
> The first link makes it previewable, but it might
> not be valid at  
> runtime eg. if the template was in WEB-INF/classes
> instead of in the  
> web context.  At runtime the second link would
> become valid so you'd  
> cascade to it.  The java for it could be:
> 
> 	@Inject
> 	@Path("context:css/mystyle.css")
> 	private Asset _stylesheet;
> 
> Is there a flaw in this?  Perhaps there's a better
> way?
> 
> Cheers,
> 
> Geoff
> 
> On 12/11/2007, at 11:26 PM, Filip S. Adamsen wrote:
> 
> > That is indeed possible:
> >
>
http://tapestry.apache.org/tapestry5/tapestry-core/guide/
> 
> > templates.html
> >
> > See "Invisible Instrumentation" at the bottom.
> >
> > -Filip
> >
> > Geoff Callender skrev:
> >> One of T4's great selling points was that the
> templates could be  
> >> made previewable in a browser or WYSIWYG tool. 
> Is this possible in  
> >> T5?
> >> Geoff
> >>
>
---------------------------------------------------------------------
> >> 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
> >
> 
> 


Home page : http://www.lombok.demon.co.uk/



      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  http://uk.promotions.yahoo.com/forgood/environment.html

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


Re: T5 Previewable pages

Posted by Geoff Callender <ge...@gmail.com>.
I was thinking particularly of stylesheet handling.  In T4 you could  
put $remove$ around a stylesheet that used a relative path.  The  
approach I'm taking in T5 is this kind of thing:

<head>
  	<link rel="stylesheet" type="text/css" href="../../css/mystyle.css"/>
	<link rel="stylesheet" type="text/css" href="${stylesheet}"/>
</head>

The first link makes it previewable, but it might not be valid at  
runtime eg. if the template was in WEB-INF/classes instead of in the  
web context.  At runtime the second link would become valid so you'd  
cascade to it.  The java for it could be:

	@Inject
	@Path("context:css/mystyle.css")
	private Asset _stylesheet;

Is there a flaw in this?  Perhaps there's a better way?

Cheers,

Geoff

On 12/11/2007, at 11:26 PM, Filip S. Adamsen wrote:

> That is indeed possible:
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/ 
> templates.html
>
> See "Invisible Instrumentation" at the bottom.
>
> -Filip
>
> Geoff Callender skrev:
>> One of T4's great selling points was that the templates could be  
>> made previewable in a browser or WYSIWYG tool.  Is this possible in  
>> T5?
>> Geoff
>> ---------------------------------------------------------------------
>> 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
>


Re: T5 Previewable pages

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
That is indeed possible:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html

See "Invisible Instrumentation" at the bottom.

-Filip

Geoff Callender skrev:
> One of T4's great selling points was that the templates could be made 
> previewable in a browser or WYSIWYG tool.  Is this possible in T5?
> 
> Geoff
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: T5 Previewable pages

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Mon, 12 Nov 2007 10:06:49 -0200, Geoff Callender  
<ge...@gmail.com> wrote:

> One of T4's great selling points was that the templates could be made  
> previewable in a browser or WYSIWYG tool.  Is this possible in T5?

Yes. Some people people use, for example, the Grid component, as <t:grid>,  
but you can use <table t:type="Grid"> as well. That's what I do. I love  
previewability. :)

-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org