Re: body-tag onLoad/onScroll

2010-06-22 Thread Jeremy Thomerson
And in that webmarkupcontainer, override istransparentresolverand return
true.
That will allow you to add components directly to the page without having to
add them all to the body's web markup container.

Jeremy Thomerson
-- sent from my smartphone - please excuse formatting and spelling errors

On Jun 22, 2010 5:00 AM, "Martin Grigorov"  wrote:

Make  a regular Wicket component: 
Then in .java:
WebMarkupContainer body = new WebMarkupContainer("theBody");
body.add(new (Simple)AttributeModifier())

afair  is no more special element.


On Tue, 2010-06-22 at 09:51 +0200, Dr. Wolf Blecher wrote:
> Hi all,
>
> I have the following situ...


Re: body-tag onLoad/onScroll

2010-06-22 Thread Martin Grigorov
Make  a regular Wicket component: 
Then in .java:
WebMarkupContainer body = new WebMarkupContainer("theBody");
body.add(new (Simple)AttributeModifier())

afair  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:
> 
>  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



body-tag onLoad/onScroll

2010-06-22 Thread Dr. Wolf Blecher
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:



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