Hi, I made a simple Chart component using Google charts api. (I also use tapestry5-jquery)
I have the following in this component: (stripped down) @SetupRender void setup() { javascriptSupport.importJavaScriptLibrary("https://www.google.com/jsapi"); } @AfterRender void afterRender() { JSONObject spec = new JSONObject(); //add needed stuff to spec javascriptSupport.addInitializerCall("drawChart", spec); } In the javascript initializer "drawChart" I have the following: (stripped down) function drawChart(spec) { google.load('visualization', '1', { packages : [ 'corechart' ], callback : function() { chart.draw(spec.data, spec.options); } }); } In a page where I use this chart I have a form that on submit updates a zone showing the chart. The first time it does not show the chart, but when I submit for a second time it does work perfectly. The first submit I get the following in my firebug console: TypeError: callbacks[(i + 1)] is undefined callbacks[i + 1].call(this); (tapestry-jquery.js line 966) I have no clue what is going on here, or how to fix this. Maybe my approach is just completely wrong here? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Importing-javascript-library-failing-tp5718846.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org