You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Philippe Paravicini <pp...@intersight.com> on 2004/06/05 02:35:15 UTC

Adding multiple stylesheets with @Shell component

Would anyone be so kind to share with me the easiest way to add 
multiple stylesheets to a page ?

I am familiar with using the 'stylesheet' attribute of the @Shell 
component, yet how would I go about using the 'stylesheets' attribute ?

Adding multiple <context-asset name="stylesheet" .../> elements in the 
.jwc leads to a parsing error.

Thank you !


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


Re: Adding multiple stylesheets with @Shell component

Posted by tmjee <tm...@hotmail.com>.
There is a stylesheet and stylesheets parameter for @Shell, the stylesheets
should be able to take in a collection or array. This works for me, maybe
you are using the stylesheet instead of stylesheets.

regards
tmjee


----- Original Message -----
From: "Philippe Paravicini" <pp...@intersight.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, June 04, 2004 4:35 PM
Subject: Adding multiple stylesheets with @Shell component


> Would anyone be so kind to share with me the easiest way to add
> multiple stylesheets to a page ?
>
> I am familiar with using the 'stylesheet' attribute of the @Shell
> component, yet how would I go about using the 'stylesheets' attribute ?
>
> Adding multiple <context-asset name="stylesheet" .../> elements in the
> .jwc leads to a parsing error.
>
> Thank you !
>
>
> ---------------------------------------------------------------------
> 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: Adding multiple stylesheets with @Shell component

Posted by Philippe Paravicini <pp...@intersight.com>.
Thanks for the hint !

To be more precise, and if one wishes to declare the stylesheets in the 
.jwc or .page file:
...
	<component id="head" type="Shell">
		<binding name="title" expression="pageTitle"/>
		<binding name="stylesheets">
			{assets.stylesheet1, assets.stylesheet2}
		</binding>
	</component>
...
	<context-asset name="stylesheet1"   path="[my-path]/stylesheet1.css"/>
	<context-asset name="stylesheet2"   path="[my-path]/stylesheet2.css"/>
...

pp


On Jun 4, 2004, at 5:58 PM, Filip S. Adamsen wrote:

> Hi Philippe,
>
> Consider using something like
>
>   ...
>   <binding name="stylesheets">
>     { stylesheet1, stylesheet2, ... stylesheetN }
>   </binding>
>   ...
>
> in your Shell declaration. This is the OGNL syntax for declaring 
> arrays, if
> I'm not mistaken. That should do it - at least it works for me. ;o)
>
> -Filip S. Adamsen
>
>> -----Original Message-----
>> From: Philippe Paravicini [mailto:pparavicini@intersight.com]
>> Sent: Saturday, June 05, 2004 2:35 AM
>> To: Tapestry users
>> Subject: Adding multiple stylesheets with @Shell component
>>
>> Would anyone be so kind to share with me the easiest way to add
>> multiple stylesheets to a page ?
>>
>> I am familiar with using the 'stylesheet' attribute of the @Shell
>> component, yet how would I go about using the 'stylesheets' attribute 
>> ?
>>
>> Adding multiple <context-asset name="stylesheet" .../> elements in the
>> .jwc leads to a parsing error.
>>
>> Thank you !
>>
>>
>> ---------------------------------------------------------------------
>> 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: Adding multiple stylesheets with @Shell component

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
> -----Original Message-----
> From: Jonny Wray [mailto:jonny_wray@yahoo.com]
> Sent: Saturday, June 05, 2004 3:05 AM
> To: Tapestry users
> Subject: RE: Adding multiple stylesheets with @Shell component
> 
> 
> I had a related question. Is there a way of specifying the media type
> for a stylesheet, to enable, for example, one stylesheet to be specific
> for printing?

No, there is currently no way to specify this. Instead, you should take a
look at the @media and/or @import rule - it should allow the functionality
you want.

  Go to http://www.w3.org/TR/CSS21/media.html#q2 for specs.

Hope this helps.

-Filip S. Adamsen



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


RE: Adding multiple stylesheets with @Shell component

Posted by Jonny Wray <jo...@yahoo.com>.
I had a related question. Is there a way of specifying the media type
for a stylesheet, to enable, for example, one stylesheet to be specific
for printing? 

--- "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk> wrote:
> Hi Philippe,
> 
> Consider using something like
> 
>   ...
>   <binding name="stylesheets">
>     { stylesheet1, stylesheet2, ... stylesheetN }
>   </binding>
>   ...
> 
> in your Shell declaration. This is the OGNL syntax for declaring
> arrays, if
> I'm not mistaken. That should do it - at least it works for me. ;o)
> 
> -Filip S. Adamsen
> 
> > -----Original Message-----
> > From: Philippe Paravicini [mailto:pparavicini@intersight.com]
> > Sent: Saturday, June 05, 2004 2:35 AM
> > To: Tapestry users
> > Subject: Adding multiple stylesheets with @Shell component
> > 
> > Would anyone be so kind to share with me the easiest way to add
> > multiple stylesheets to a page ?
> > 
> > I am familiar with using the 'stylesheet' attribute of the @Shell
> > component, yet how would I go about using the 'stylesheets'
> attribute ?
> > 
> > Adding multiple <context-asset name="stylesheet" .../> elements in
> the
> > .jwc leads to a parsing error.
> > 
> > Thank you !
> > 
> > 
> >
> ---------------------------------------------------------------------
> > 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: Adding multiple stylesheets with @Shell component

Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Hi Philippe,

Consider using something like

  ...
  <binding name="stylesheets">
    { stylesheet1, stylesheet2, ... stylesheetN }
  </binding>
  ...

in your Shell declaration. This is the OGNL syntax for declaring arrays, if
I'm not mistaken. That should do it - at least it works for me. ;o)

-Filip S. Adamsen

> -----Original Message-----
> From: Philippe Paravicini [mailto:pparavicini@intersight.com]
> Sent: Saturday, June 05, 2004 2:35 AM
> To: Tapestry users
> Subject: Adding multiple stylesheets with @Shell component
> 
> Would anyone be so kind to share with me the easiest way to add
> multiple stylesheets to a page ?
> 
> I am familiar with using the 'stylesheet' attribute of the @Shell
> component, yet how would I go about using the 'stylesheets' attribute ?
> 
> Adding multiple <context-asset name="stylesheet" .../> elements in the
> .jwc leads to a parsing error.
> 
> Thank you !
> 
> 
> ---------------------------------------------------------------------
> 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