You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mike D Pilsbury <mi...@pekim.co.uk> on 2003/10/25 13:01:44 UTC
with rel attribute set to other than "stylesheet"
I know that the Shell component allows the specification of stylesheets,
that render thus
<head>
<link rel="stylesheet" type="text/css" *href="../../style.css"* title="style">
</head>
But how do I generate a <link> element in the <head> with a different rel attribute. E.g.
<head>
<link rel="icon" href="favicon.ico" />
</head>
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: with rel attribute set to other than "stylesheet"
Posted by Mike D Pilsbury <mi...@pekim.co.uk>.
That works a treat. Thanks.
I'll try to read the docs a bit more carefully in future before I ask a
question.
Mike
>The Shell component's delegate parameter can be used for this. You provide an object (probably an
>inner class instance) that implements IRender:
>
>public void render(...)
>{
> writer.beginEmpty("link");
> writer.attribute("rel", "icon");
> writer.attribute("href", "favicon.ico");
>}
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/tapestry
>http://jakarta.apache.org/commons/sandbox/hivemind/
>http://javatapestry.blogspot.com
>
>
>
>>-----Original Message-----
>>From: Mike D Pilsbury [mailto:mike@pekim.co.uk]
>>Sent: Saturday, October 25, 2003 7:02 AM
>>To: Tapestry users
>>Subject: <link> with rel attribute set to other than "stylesheet"
>>
>>
>>I know that the Shell component allows the specification of
>>stylesheets,
>>that render thus
>>
>><head>
>> <link rel="stylesheet" type="text/css"
>>*href="../../style.css"* title="style"> </head>
>>
>>But how do I generate a <link> element in the <head> with a
>>different rel attribute. E.g.
>>
>><head>
>> <link rel="icon" href="favicon.ico" />
>></head>
>>
>>
>>Mike
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: with rel attribute set to other than "stylesheet"
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
The Shell component's delegate parameter can be used for this. You provide an object (probably an
inner class instance) that implements IRender:
public void render(...)
{
writer.beginEmpty("link");
writer.attribute("rel", "icon");
writer.attribute("href", "favicon.ico");
}
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com
> -----Original Message-----
> From: Mike D Pilsbury [mailto:mike@pekim.co.uk]
> Sent: Saturday, October 25, 2003 7:02 AM
> To: Tapestry users
> Subject: <link> with rel attribute set to other than "stylesheet"
>
>
> I know that the Shell component allows the specification of
> stylesheets,
> that render thus
>
> <head>
> <link rel="stylesheet" type="text/css"
> *href="../../style.css"* title="style"> </head>
>
> But how do I generate a <link> element in the <head> with a
> different rel attribute. E.g.
>
> <head>
> <link rel="icon" href="favicon.ico" />
> </head>
>
>
> Mike
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org