I'm trying to use JSNI to wrap Actate's JSAPI and have GWT control my BI environment. I've done searches and read the docs. I've seen the scriptaculous stuff and browsed the Tatami code for samples.
However, I'm still having problems getting an Actuate javascript constructor to work properly.
*method and class names have been altered to protect the innocent :)
The base javascript code was pulled directly from a working hand coded javascript and html file.
public native void someMethod(String url, String userId, String pword) /+{
$wnd.actuate.initialize(url, usdrId, pword,
th...@package.MyClass::otherMethod()();
);
}+/;
public native otherMethod() /+ {
th...@package.MyClass::varViewer = new $wnd.actuate.Viewer("myDivId");
}+/;
I have put alert() messages everywhere, so I know that it gets into otherMethod when it is supposed to.
The problem is that new $wnd.actuate.Viewer("myDivId"); throws some type of constructor not found error.
Strangely, when doing the same function (new actuate.Viewer("myDivId") ) from a plane javascript/html file and not using JSNI, it works just fine.
Anyone have any ideas on this one?
Thanks!