vaseems / gwt-google-apis

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

Cannot read property 'document' of null error when Gauge is displayed a second time #485

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:
gwt-visualization-1.1.1

Platform information (OS, Browser, GWT version).  Does the issue exist on
other platforms?
Mac OS + Chrome

I can successfully display a gauge the first time the page is loaded but when I 
try to create a new gauge without reloading the html page (by simply invoking a 
onValueChange() using GWT History), an error (Cannot read property 'document' 
of null error) is thrown

Here's the code:

                                            DataTable data = DataTable.create();
                                            data.addColumn(ColumnType.STRING, "Task");
                                            data.addColumn(ColumnType.NUMBER, "Hours per Day");

                                            data.addRows(1);
                                            data.setValue(0, 0, "Response");

                                            data.setValue(0, 1, 1);
                                            gauge = new Gauge(data, createOptions());;
                                            gauge.setStyleName("gauge");
                                            gauge.setWidth("200px");

                                            panelResults.add(gauge);

Of course this is called after    
VisualizationUtils.loadVisualizationApi(onLoadCallback, Gauge.PACKAGE);

Workaround if you have one:
None

Links to the relevant Google Group posts:

Original issue reported on code.google.com by jve...@gmail.com on 12 Oct 2011 at 9:04

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
I confirm this error on gwt-visualization-1.1.2
Windows 7 + Chrome

Original comment by kvam...@gmail.com on 10 Apr 2012 at 9:38

GoogleCodeExporter commented 9 years ago
Same problem.

Original comment by Andiga...@gmail.com on 17 Jul 2012 at 12:50