Re: Contributing CSS with Panel components?
On Jun 17, 2008, at 7:07 PM, Matej Knopp wrote: Wicket detects the CSS being rendered and should load the CSS on fly using ajax. Of course you will not see the css link in the page source because it has been added later (and you only see the initial source). Aha. Thanks, that was it. I had expected to see a link similar to those generated earlier in the page tree. -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Contributing CSS with Panel components?
Wicket detects the CSS being rendered and should load the CSS on fly using ajax. Of course you will not see the css link in the page source because it has been added later (and you only see the initial source). You can try replacing AjaxTabbedPanel with the regular one to see if the styling works. If it does it might be problem with Ajax header contribution. -Matej On Wed, Jun 18, 2008 at 1:04 AM, Matej Knopp <[EMAIL PROTECTED]> wrote: > Mind showing us some code? The pattern you are describing here is very > common and it should work quite well. > > -Matej > > On Wed, Jun 18, 2008 at 12:55 AM, David Nedrow <[EMAIL PROTECTED]> wrote: >> Hmm, Google is not being helpful. >> >> Is there a way to contribute CSS when a Panel is added to a page? >> >> I like the idea of keeping the CSS with the related class and html file, but >> have not figured out if it is possible to add CSS at render time for >> components contained in the page. >> >> IE., I have UserDetailsPanel.java, UserDetailsPanel.html, and >> UserDetailsPanel.css. >> >> If I include the panel in an AjaxTabbedPanel(), with UserDetailsPanel.java >> containing a HeaderContributor.forCss() pointing to UserDetailsPanel.css, >> the rendered page does not contain the css link. Frankly, this is what I >> would expect, given that the page header has already been rendered. >> >> Is this a circumstance in which I will need to contribute the CSS earlier in >> the process, or is there a mechanism that can be used to do this when the >> panel is rendered? >> >> -David >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Contributing CSS with Panel components?
how do you know css is not contributed after ajax? do you not see it applied or do you not see the link tag when you view source in the browser? what version of wicket? what version of browser? -igor On Tue, Jun 17, 2008 at 3:55 PM, David Nedrow <[EMAIL PROTECTED]> wrote: > Hmm, Google is not being helpful. > > Is there a way to contribute CSS when a Panel is added to a page? > > I like the idea of keeping the CSS with the related class and html file, but > have not figured out if it is possible to add CSS at render time for > components contained in the page. > > IE., I have UserDetailsPanel.java, UserDetailsPanel.html, and > UserDetailsPanel.css. > > If I include the panel in an AjaxTabbedPanel(), with UserDetailsPanel.java > containing a HeaderContributor.forCss() pointing to UserDetailsPanel.css, > the rendered page does not contain the css link. Frankly, this is what I > would expect, given that the page header has already been rendered. > > Is this a circumstance in which I will need to contribute the CSS earlier in > the process, or is there a mechanism that can be used to do this when the > panel is rendered? > > -David > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Contributing CSS with Panel components?
Mind showing us some code? The pattern you are describing here is very common and it should work quite well. -Matej On Wed, Jun 18, 2008 at 12:55 AM, David Nedrow <[EMAIL PROTECTED]> wrote: > Hmm, Google is not being helpful. > > Is there a way to contribute CSS when a Panel is added to a page? > > I like the idea of keeping the CSS with the related class and html file, but > have not figured out if it is possible to add CSS at render time for > components contained in the page. > > IE., I have UserDetailsPanel.java, UserDetailsPanel.html, and > UserDetailsPanel.css. > > If I include the panel in an AjaxTabbedPanel(), with UserDetailsPanel.java > containing a HeaderContributor.forCss() pointing to UserDetailsPanel.css, > the rendered page does not contain the css link. Frankly, this is what I > would expect, given that the page header has already been rendered. > > Is this a circumstance in which I will need to contribute the CSS earlier in > the process, or is there a mechanism that can be used to do this when the > panel is rendered? > > -David > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Contributing CSS with Panel components?
Hmm, Google is not being helpful. Is there a way to contribute CSS when a Panel is added to a page? I like the idea of keeping the CSS with the related class and html file, but have not figured out if it is possible to add CSS at render time for components contained in the page. IE., I have UserDetailsPanel.java, UserDetailsPanel.html, and UserDetailsPanel.css. If I include the panel in an AjaxTabbedPanel(), with UserDetailsPanel.java containing a HeaderContributor.forCss() pointing to UserDetailsPanel.css, the rendered page does not contain the css link. Frankly, this is what I would expect, given that the page header has already been rendered. Is this a circumstance in which I will need to contribute the CSS earlier in the process, or is there a mechanism that can be used to do this when the panel is rendered? -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]