All behaviors are invoked from Component.onComponentTag(). When a web
page renders it does not call onComponentTag() for the page, as the
page has no associated markup tag.
That means, though you can do add(HeaderContributor.forCss()) (assume
you are adding to a page) nothing will happen. The CSS
Jan - in the other thread - quite rightly pointed out that
HeaderContribution does work on pages. It only does not work if a
component is attached to html. What makes html different is that
it must partially be rendered befor the head section. Why exactly a
component starts rendering before the
But add(HeaderContributor.forCss()) does not modify component tag. It
affects header contribution. Header contribution and component tag
modifications are two different things.
page.add(HeaderContributor.forCss()) works as long as we don't have
that check that throws exception when you add
please see the other thread
Juergen
On 6/24/07, Matej Knopp [EMAIL PROTECTED] wrote:
But add(HeaderContributor.forCss()) does not modify component tag. It
affects header contribution. Header contribution and component tag
modifications are two different things.
my code which does this:
add(HeaderContributor.forCss(CSS));
now throws the following exception. my web page needs to contribute CSS to
the header. i'm wondering, why can't i do it this way anymore (it seems
like WebPage is a component like any other and my code did work fine
On 6/23/07, Jonathan Locke [EMAIL PROTECTED] wrote:
my code which does this:
add(HeaderContributor.forCss(CSS));
now throws the following exception. my web page needs to contribute CSS
to
the header. i'm wondering, why can't i do it this way anymore (it seems
like WebPage is a
can we make webpage attach to html tag?
That sounds like a better solution.
Eelco
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No
Arrgh. Discard my previous reply. This is wrong. Why shouldn't I be
able to do header contribution on behavior attached to a page? This
doesn't make sense!
I know onComponentTag doesn't make sense, but that's IMHO not valid
reason to forbid header contribution as well.
-Matej
On 6/24/07,