Abstract Javascript Component

Hello everybody.

I need to resolve this problem. We are using some addon which contains Abstract Javascript Component (using libraries jQuery and custom js library). The result of this component is that 2 components in HTML structure are rendered. We are using this component in sub-window (SW).

So if we open this SW for first time everything is ok. But closing this window, and opening this window resulted to that only 1 HTML component is rendered and second one isn’t.

The problem is that this libraries are included into HEAD and aren’t removed after the component is destroyed.

The first tought is that the error need to be fixed in this addon.
And the second is that i think that if custom javascript component is destroyed, vaadin need to remove its libraries from head section.

Please if you have some good quick workaround for this i would be happy :slight_smile:


Hi, If the imported libraries are the Problem, why does it work at the first time? .
I am just trying to understand. If the addon is responsible for adding these lib imports into the main client page, then it should remove it as well.

A little code snippet might help in suggesting a favoured solution. However, in the worst case scenario, you might want to use Page.getJavascript.execute(script) and remove the import your self.

Butt basically, You don’t remove a script from memory by removing the script tag that loaded it-
you would need to remove (or set to undefined) each function or object that is defined by the script.

Best Regards