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
<[EMAIL PROTECTED]> 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:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]