pombreda / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

Custom Datasource Query #471

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release: 1.1.2

Platform: GWT 2.1

Within the GWT Code i try to load a custom datasource using the Query function:

Query query = Query.create("sample");
query.send(new Callback() {....

that error comming up:

com.google.gwt.core.client.JavaScriptException: (TypeError): $wnd.google is 
undefined
 fileName: http://127.0.0.1:8888
 lineNumber: 41
 stack: ("sample")@http://127.0.0.1:8888:41
connect("http://127.0.0.1:8888/AnalysisVisualization.html?gwt.codesvr=127.0.0.1:
9997","^W+?eL`>$.Uy1)hQ","127.0.0.1:9997","analysisvisualization","2.1")@:0
((void 
0),"analysisvisualization","http://127.0.0.1:8888/analysisvisualization/",0)@htt
p://127.0.0.1:8888/analysisvisualization/hosted.html?analysisvisualization:281
C()@http://127.0.0.1:8888/analysisvisualization/analysisvisualization.nocache.js
:2
(21)@http://127.0.0.1:8888/analysisvisualization/analysisvisualization.nocache.j
s:8
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.visualization.client.Query$.create(Query.java)

if i use the custom datasource (from the custom datasource example) within an 
html page like that: 
var query = new google.visualization.Query('sample');
query.send(handleQueryResponse);

it works without any issue.

Original issue reported on code.google.com by j.hollerer@amergy.com on 15 Jun 2011 at 10:11

GoogleCodeExporter commented 9 years ago
The error $wnd.google is undefined usually means the API isn't loaded yet:

http://code.google.com/p/gwt-google-apis/wiki/VisualizationFAQ#Why_do_I_get_an_e
xception_saying_that_$wnd.google.visualization

Original comment by zundel@google.com on 20 Jun 2011 at 7:11

GoogleCodeExporter commented 9 years ago

Original comment by zundel@google.com on 28 Oct 2011 at 4:17