Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: Grails-Google-Visualization-API 0.3
-
Fix Version/s: Grails-Google-Visualization-API 0.4.2
-
Labels:None
-
Environment:Grails 2.0.0M2, plugin version 0.4.1 (not present in drop-down list)
-
Patch attached:Yes
Description
When registering a callback for the ready event via the "ready=" taglib parameter, the call to the javascript "addListener" function is done after the call to "visualization.draw()". Thus, the callback function is not called when the ready event is fired too soon.
The fix seems to be modify the _visualization_javascript.gsp file to register events before draw()ing.
I can confirm this works here, but I didn't test if there are side effects for other events.
Thanks for your patch file. I will fix the code soon and release a new version.