Component.getPage() always returns null

2009-06-26 Thread Azzeddine Daddah
Hi everybody, I want to create a text blur effect behavior so that when the text field gets focussed, the value will be empty and when blurred the value will be set to the default value. I use the Wickext library which integrates jQuery in Wicket. The problem is that the component's page in the bi

Re: Component.getPage() always returns null

2009-06-27 Thread Johan Compagner
You cant do that in the bind because the bind is called when you add the behavior to the component and that is on construction time so the component itself isnt added to its parent, or the parent/panel isnt added to its parent (you are in the constructor of a panel) So the hierarchy isnt complete

Re: Component.getPage() always returns null

2009-06-27 Thread Johan Compagner
By the way what you want to do (adding a js reference to the page isnt needed at all, just do that in the render head of the component/behavior itself) wicket transfers it for you to the head of the page On 27/06/2009, Johan Compagner wrote: > You cant do that in the bind because the bind is call