One thing I'd like to see in Tapestry 4.1 or 5 is a simple approach for handling CSS and related assets inside component libraries. My approach to doing this in 4.0 has been to modify the Shell component to include hivemind contributions. So the components hivemodule.xml can specify something like this:

<contribution configuration-id="cognition.StyleSheets">
    <stylesheet asset="classpath:/myapp/components/screen.css"
      media="screen" />
</contribution>

This has the added benefit of being able to specify a media attribute for the included css. At one point I added code to support an inline attribute in the hivemind configuration, which when set to true would use an @import statement in a style block instead of a link. Contributions get rendered first, so the user can also easily extend any css in their own file.

It would be nice to have unprotected assets as someone had suggested, im looking into creating this for cognition so a componet library can include its own css assets as well.

Are there any other common approaches to this?

.........................................

Derick Fernando
Lead Architect
[EMAIL PROTECTED]
(323) 314-9593
http://www.thelabllc.com

Content is for intended recipient only.
Copyright 2001-2005, The Lab, LLC

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to