When transporting some of my previously jsni written code to jsinterop
framework, I am facing problems when accessing java methods from
javascript file.
For example in this jsni code I am accessing java method getOrCreateJsObj()
and I need to convert this jsni code to jsinterop framework. How can I do
this? What is the syntax for this? I tried official docs way, but it didn't
worked out. Please help...
//the jsni method that I need to convert into jsinterop
private native void addWidgetListener(String event, JavaScriptObject fn)
/*-{
var component =
[email protected]::getOrCreateJsObj()();
component.addListener(event, fn);
}-*/;
public JavaScriptObject getOrCreateJsObj() {
JavaScriptObject jsObj = getComponentJS(id);
if (jsObj != null) {
return jsObj;
} else {
return create(config);
}
}
--
You received this message because you are subscribed to the Google Groups "GWT
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit/05142eea-e9f5-4a99-8545-3ef27e38fcdan%40googlegroups.com.