Make <body> a regular Wicket component: <body wicket:id="theBody"> Then in .java: WebMarkupContainer body = new WebMarkupContainer("theBody"); body.add(new (Simple)AttributeModifier(....))
afair <body> is no more special element. On Tue, 2010-06-22 at 09:51 +0200, Dr. Wolf Blecher wrote: > Hi all, > > I have the following situation: > I want to add a java script function call to the body tag which get's as > parameter the id of a wicket panel: > > <body onload="javascript: initPosition('sidebarRightSelection65');" > onscroll="javascript: sideBarRightPos('sidebarRightSelection65');"> > > So I tried the following: > > add(new BodyTagAttributeModifier("onload", true, new Model("javascript: > initPosition('" + selection.getMarkupId() + "');"), selection)); > > I also let the Panel implement the IHeaderContributor Interface but this did > not work either. > > Neither way worked. > > What I want to basically achieve is that if the element is scrolled out of the > page, its style will be set to fixed, so that keeps shown. I have a javascript > function for this, but this function needs the id of the element. > > Any hints? > > Cheers > > Wolf > > --------------------------------------------------------------------- > 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