Re: [Wicket-user] cannot add CSS to web page?

2007-06-24 Thread Juergen Donnerstag
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

Re: [Wicket-user] cannot add CSS to web page?

2007-06-24 Thread Juergen Donnerstag
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

Re: [Wicket-user] cannot add CSS to web page?

2007-06-24 Thread Matej Knopp
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

Re: [Wicket-user] cannot add CSS to web page?

2007-06-24 Thread Juergen Donnerstag
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.

[Wicket-user] cannot add CSS to web page?

2007-06-23 Thread Jonathan Locke
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

Re: [Wicket-user] cannot add CSS to web page?

2007-06-23 Thread Igor Vaynberg
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

Re: [Wicket-user] cannot add CSS to web page?

2007-06-23 Thread Eelco Hillenius
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

Re: [Wicket-user] cannot add CSS to web page?

2007-06-23 Thread Matej Knopp
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,