GWT-Ext2 - JSNI method calls

14 views
Skip to first unread message

John

unread,
Feb 11, 2008, 5:02:29 PM2/11/08
to GWT-Ext Developer Forum
I feel as if I'm missing something basic here, and I was wondering if
anyone else has run into problems with any JSNI methods of GWT-EXT2.
I'm currently debugging this issue and I'll more information later,
but I am getting the following error:

java.lang.Error: Unresolved compilation problem:
at
com.gwtext.client.util.JavaScriptObjectHelper.setAttribute(JavaScriptObjectHelper.java:
36)
at com.gwtext.client.widgets.Component.initConfig(Component.java:285)
at com.gwtext.client.widgets.Component.<init>(Component.java:117)
at com.gwtext.client.widgets.BoxComponent.<init>(BoxComponent.java:
45)
at com.gwtext.client.widgets.Container.<init>(Container.java:57)
at com.gwtext.client.widgets.Panel.<init>(Panel.java:47)
at com.gwtext.client.widgets.grid.GridPanel.<init>(GridPanel.java:56)
...
My module definition is (company info snipped):
<module>
...
<inherits name="com.gwtext.GwtExt"/>
<inherits name='org.gwtwidgets.WidgetLibrary'/>
</module>

The only GWT-EXT call I make is (all others are commented out):
GridPanel grid = new GridPanel();

This appears to also occur when executing other GWT-EXT functions that
lead to JSNI. If I comment out all GWT-EXT lines the application will
run normally (sans GWT-EXT). In our project we actually make
(successful) use of JSNI elsewhere.

Environment:
Mac OS X 10.4
GWT 1.4.60
Java 1.5.0

My next steps are to try the older version of GWTEXT2 and/or try to
come up with a simple example to debug and for others to peruse.

-John

John

unread,
Feb 11, 2008, 7:45:29 PM2/11/08
to GWT-Ext Developer Forum
>
> My next steps are to try the older version of GWTEXT2 and/or try to
> come up with a simple example to debug and for others to peruse.
>

I am able to run a very basic example w/o the other webapp code
without any issues, so this may be an integration issue with my
existing webapp.

With GWT-EXT 0.93 I get similar issues:

0.93 trace:
com.sourcelabs.concentrator.webUI.client.ConcentratorMainView (see
associated exception for details)
com.google.gwt.core.client.JavaScriptException: JavaScript TypeError
exception: Undefined value
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
481)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:
270)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:
137)
at com.gwtext.client.core.Ext.setBlankImageUrl(Ext.java:190)

With 0.93 setBlankImage is receiving a valid String, but jtype in
ModuleSpace.invokeNative is null. With 2.0.1 a similar issue occurs,
excepting the top frames:

2.0.1 trace:
com.google.gwt.core.client.JavaScriptException: JavaScript TypeError
exception: Undefined value
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
481)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:
270)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:
137)
at com.gwtext.client.widgets.Component.init(Component.java:99)
at com.gwtext.client.widgets.Component.<clinit>(Component.java:88)

I have no problems calling simple JSNI methods from the local class.

-John

Sanjiv Jivan

unread,
Feb 11, 2008, 8:04:12 PM2/11/08
to gwt...@googlegroups.com
Hi John,
Can you try compiling it using the command line tools and see if it compiles / runs in your browser?

The wiki Getting Started doc has a hello world project that you downlaod and compare you see what you're doing differently.

http://www.gwt-ext.com/wiki/index.php/Tutorial:Introduction_to_GWT-Ext_2.0

Sanjiv

John

unread,
Feb 11, 2008, 8:59:23 PM2/11/08
to GWT-Ext Developer Forum


On Feb 11, 5:04 pm, "Sanjiv Jivan" <sanjiv.ji...@gmail.com> wrote:
> Hi John,
> Can you try compiling it using the command line tools and see if it compiles
> / runs in your browser?

First off, thank you for all your hard work; from what I've seen, this
project is well designed.

I've managed to get it working under Web Mode under tomcat, and with
Hosted mode by using a standard browser (firefox) to connect directly
to port 8888. With the Hosted Mode Web Browser I get the
JavaScriptObjectHelper.setAttribute issue. I'll experiment with this
for the time being, but I think I'm on the right track.

-John

John

unread,
Feb 11, 2008, 10:00:49 PM2/11/08
to GWT-Ext Developer Forum


On Feb 11, 5:59 pm, John <John.V.Kew...@gmail.com> wrote:
> I've managed to get it working under Web Mode under tomcat, and with
> Hosted mode by using a standard browser (firefox) to connect directly
> to port 8888. With the Hosted Mode Web Browser I get the
> JavaScriptObjectHelper.setAttribute issue. I'll experiment with this
> for the time being, but I think I'm on the right track.
>

So I think my issue may be related to the following bug, but I can't
be sure without testing a new version of WebKit with my existing
version of GWT.

JSNI ($wnd) doesn't work properly in Safari
http://code.google.com/p/google-web-toolkit/issues/detail?id=904
http://bugs.webkit.org/show_bug.cgi?id=11399

This issue was fixed in september 2007. The WebKit version in gwt
1.4.60 (and **.61) is 418.9, my current Safari version is 523.12.2
(which is why it may work in my standalone browser).
Reply all
Reply to author
Forward
0 new messages