How to load external javascript file on Vaadin 6.8?

383 views Asked by At

I am using Vaadin 6.8 and need to load external javascript resource, but Vaadin of version 6.8 does not support @JavaScript annotation.

I have also tried Vaadin's CustomLayout, it loads html page, but does not execute javascript in that html under <script> tag?

Any other solutions on Vaadin 6.8?

1

There are 1 answers

0
mstahv On

Override method called writeAjaxPageHtmlHeader in your servlet class. You can there add any html to the head part of the "host page". See AbstractApplicationServlet for other extension points if you want to add it to for example body part.

https://dev.vaadin.com/svn/versions/6.8/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java