Hi there,
This issue took me all day to sort out so am posting the fix here to
help others out.
I was trying to get setRefreshInterval working.
this.query.setRefreshable(true);
this.query.setRefreshInterval(10);
this.query.send(function(response) {
self.handleResponse(response)
});
Lots of problems with this though.. See here for example.
http://groups.google.com/group/google-visualization-api/browse_thread/thread/2e7b35f01cd44e85/c033e54d1a3d8147
http://code.google.com/p/google-visualization-api-issues/issues/detail?id=106
What I was seeing was the Google spreadsheet datasources were working
fine but my own custom datasource was ignoring the refresh interval.
Solution.
Turns out that google.visualization.Query supports two modes JSON and
JSONP. I found I had to change to using JSONP with this call.
query = new google.visualization.Query(dataSourceUrl,
{sendMethod:'scriptInjection'});
Then I was getting cross-site script errors. I had to dump restricted
mode on my custom servlet.
public class RegisterDataSourceServlet extends DataSourceServlet {
@Override
protected boolean isRestrictedAccessMode() {
return false;
}
}
Hope that helps others.
Damon.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.