Adding javascript and css resources in a page

Hi there,

we are using vaadin7 and we are extensively using AbstractJavaScriptComponent, so we have integrated different javascript components in our pages. Every javascript widget has its java counterpart for which we have defined the javascript and css resources using @Javascript and @StyleSheet.
They are working fine but we would like to know if it is possible to add those dependancies at html page level (in the same way it was possible in vaadin 6) or if we are stuck with @Javascript and @StyleSheet.
Many dependancies are shared from different components and it could be great to add them once so vaadin doesn’t add it every time.

Thanks for your help,
Emanuele

Yes it’s possible. Have a look at this post:
https://vaadin.com/forum/#!/thread/1676923/3436649
. You can add e.g. a script tag in the same way. Just note that it will not get removed when unless you manually remove it or close the entire UI…