Ad dynamic javascript to a component

2013-01-30 Thread divad91
Hi,

I would like to add javascript inside a panel. The problem is that I need to
get server informations inside the javascript. I know we can an abstract
behavior and add the javascript in the header by overriding the  renderHead
method  but i don't want my script in the .

I would like my javascrit render under inside my panel. When the visiblity
of the panel will change, the javascript will be executed.

  
  


 
  
 


Thanks for help



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ad-dynamic-javascript-to-a-component-tp4655947.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ad dynamic javascript to a component

2013-01-31 Thread Martin Grigorov
Hi,

Since this is a Panel you can add child components inside it.
So you can use a plain Label, for example, to render the JS.

add(new Label("script", yourJavaScript));


On Thu, Jan 31, 2013 at 12:17 AM, divad91  wrote:

> Hi,
>
> I would like to add javascript inside a panel. The problem is that I need
> to
> get server informations inside the javascript. I know we can an abstract
> behavior and add the javascript in the header by overriding the  renderHead
> method  but i don't want my script in the .
>
> I would like my javascrit render under inside my panel. When the visiblity
> of the panel will change, the javascript will be executed.
>
> 
> 
>
> 
>
> 
> 
> 
>
> Thanks for help
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Ad-dynamic-javascript-to-a-component-tp4655947.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>