Abstract Javascript Component and Optimized Widget Set

hi following question:
In the book chapter https://vaadin.com/book/vaadin7/-/page/mobile.optimization.html is described how to add vaadin standard components conntectors in the WidgetLoaderFactory.java. to optimize the performance.

in my project i have a AbstractJavascriptComponent with the javascript file and JavaScriptComponentState. How do i add the connector of this component to the LoaderFactory.

the javascript functions in the java file
addFunction(“someFunction”)
never get called. I only see exeptions in the browser console

com.vaadin.client.ApplicationConnection
SEVERE: Error performing server to client RPC callsjava.lang.IllegalStateException: There is no information about com.vaadin.ui.JavaScript$JavaScriptCallbackRpc.call. Did you remember to compile the right widgetset?

Caused by: com.vaadin.client.metadata.NoDataException: There are no parameter type data for com.vaadin.ui.JavaScript$JavaScriptCallbackRpc.call

Have someone a solution proposal ?

For your first question:
A Javascript Component doesn’t have a “conventional” GWT connector but a Javascript Connector which isn’t directly compiled and contained in the Widgetset. As a result you can’t really add it to the optimizedWidgetsetBundleLoaderFactory and you also don’t really have.

It seems like you’re not using the correct RPCs in your JS Component. For custom JS Components use:

Using RPC from Javascript