Hi i’m doing some test to create a new javascript component. I read all the documentation about this, but i have one question:
I created :
- Server-Side class that extends AbstractJavaScriptComponent.
- State class that extends JavaScriptComponentState
- and pure javascript file.
All work fine.
Than i added an rpcclient call in my server side class like:
public void addLayer(Layer layer){
// callFunction(“addLayer”, layer);
getRpcProxy(JWidgetClientRpc.class).addLayer(layer);
}
and i added in the javascript file the relative function:
this.registerRpc({
addLayer: function(layer) {
alert("Layer3: "+layer);
}
The call work, but the problem is that every time that is invoked, before that function, is always invoked also onStatusChange inside my javascript file.
For me is a strange behaviour because i haven’t changed the status of the component. This happen also with simple rpc call ( ex.: callFunction(“addLayer”, layer); ), but only for pure javascript component. If i do the same things with a gwt widget, when i call the rpc client method, it works like aspected (without enter inside onStatusChange).
What i missing???