Since when does a Label, Link, Image, WebMarkupContainer contribute to the <head> section of a page?
It definitely is not obvious to me that such should be the case. Martijn On Sun, Feb 15, 2009 at 8:15 PM, Martin Makundi <martin.maku...@koodaripalvelut.com> wrote: > Tnx. :) Why don't the component implement iheadercontributor already? > It would be more obvious then.. > > ** > Martin > > 2009/2/15 Igor Vaynberg <igor.vaynb...@gmail.com>: >> yep, thats how it works. any component can implement iheadercontributor. >> >> -igor >> >> On Sat, Feb 14, 2009 at 11:29 PM, Martin Makundi >> <martin.maku...@koodaripalvelut.com> wrote: >>>> unless you are planning to reuse such snippets it is cleaner to let >>>> your component implement IHeaderContributor. >>> >>> So if I make a Panel implement IHeaderContributor, the renderHead will >>> automatically be called? This would be very nice. Maybe it should be >>> more apparent from the framework? >>> >>> ** >>> Martin >>> >>>> >>>> -igor >>>> >>>> On Sat, Feb 14, 2009 at 2:52 AM, Martin Makundi >>>> <martin.maku...@koodaripalvelut.com> wrote: >>>>> Hi! >>>>> >>>>> Does Wicket have this functionality built-in? Would it make sense? >>>>> public abstract class AbstractHeaderJavaScriptBehavior extends >>>>> AbstractBehavior >>>>> implements IHeaderContributor { >>>>> >>>>> /** >>>>> * @see >>>>> org.apache.wicket.behavior.AbstractBehavior#renderHead(org.apache.wicket.markup.html.IHeaderResponse) >>>>> */ >>>>> @Override >>>>> public void renderHead(IHeaderResponse response) { >>>>> super.renderHead(response); >>>>> response.renderJavascript(getHeaderJavaScript(), getScriptId()); >>>>> } >>>>> >>>>> /** >>>>> * @return default null >>>>> */ >>>>> public String getScriptId() { >>>>> return null; >>>>> } >>>>> >>>>> /** >>>>> * @return Javascript wanted for header contribution. >>>>> */ >>>>> public abstract CharSequence getHeaderJavaScript(); >>>>> } >>>>> >>>>> ** >>>>> Martin >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org