You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Ted Steen <te...@gmail.com> on 2007/03/30 12:57:37 UTC

T5 adding additional stylesheets to page (from a component)

If my component needs to contribute a script to a page I can use the
PageRenderSupport and just addScriptLink(...)
Why cant I do the same thing with a css?
Is it not implemented yet or is it intentionally left out? If so, why?

-- 
/ted

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


Re: T5 adding additional stylesheets to page (from a component)

Posted by Howard Lewis Ship <hl...@gmail.com>.
It's definately a feature worth introducing; please add a JIRA issue.

On 3/30/07, Ted Steen <te...@gmail.com> wrote:
> right now im doing like this in beginRender()
>
>                 Document document = environment.peek(Document.class);
>                 Element head = document.find("html/head");
>                 if (head == null) return;
>                 head.elementAt(0, "link", "rel", "stylesheet", "type", "text/css",
> "href", jsCalendarStylesheet
>                                 .toClientURL());
>
> but it feels a little hackish..
>
> 2007/3/30, Ted Steen <te...@gmail.com>:
> > If my component needs to contribute a script to a page I can use the
> > PageRenderSupport and just addScriptLink(...)
> > Why cant I do the same thing with a css?
> > Is it not implemented yet or is it intentionally left out? If so, why?
> >
> > --
> > /ted
> >
>
>
> --
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: T5 adding additional stylesheets to page (from a component)

Posted by Ted Steen <te...@gmail.com>.
right now im doing like this in beginRender()

		Document document = environment.peek(Document.class);
		Element head = document.find("html/head");
		if (head == null) return;
		head.elementAt(0, "link", "rel", "stylesheet", "type", "text/css",
"href", jsCalendarStylesheet
				.toClientURL());

but it feels a little hackish..

2007/3/30, Ted Steen <te...@gmail.com>:
> If my component needs to contribute a script to a page I can use the
> PageRenderSupport and just addScriptLink(...)
> Why cant I do the same thing with a css?
> Is it not implemented yet or is it intentionally left out? If so, why?
>
> --
> /ted
>


-- 
/ted

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