tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bodach, Kai-Michael" <kai.michael.bod...@condat.de>
Subject RE: component stylesheet
Date Mon, 17 May 2004 09:51:29 GMT
Hi,

I was in a similar situation. I solved this problem by creating a extending
BasePage. This extended version of BasePage has a stylesheet collection
property and few methods to add an IAsset or a Collection of IAssets to this
collection. Then I create a class that implements the IRender interface, I
named it StyleLinkRenderer. This class gets the whole Collection of the
stylesheet Assets and redered it like the Shell component. In my Border
component, where I have the Shell component I bind this StyleLinkRenderer at
the Shells delegate parameter. So every component of my application pages
have the feasibility to add there own external stylesheets to the Shell
component. This solution works fine in my environment and the only think I
have to attend is to define unique class or id's in my css files. That I
handle by define a naming rule like this {componentname}_{classname} or
{componentname}_{id}.

-kai

-----Original Message-----
From: Marius Siegas [mailto:marius@elinara.ktu.lt]
Sent: Monday, May 03, 2004 11:21 AM
To: Tapestry users
Subject: component stylesheet


Hi,

   Is there a way for a component to add stylesheet to a page?
   The problem is i want to make component with its own stylesheet and i 
want this styleseet to be seamlessly integrated into the page when the 
component is used. It would be nice to be able to do this without any 
special containing components, just a simple Shell or smth...
   By the way, if you want to suggest to output the style inside a 
<style/> tag, then read xhtml specification again...

--
Marius S.


---------------------------------------------------------------------
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


Mime
View raw message