That's the correct way to reference external resources (prior to Wicket 6). Wicket will just include a script tag in your HeaderResponse container.
This looks like it might be an issue related to the way you initialize the google maps API. This stackoverflow comment suggests a possible solution (http://stackoverflow.com/questions/7811985/warning-a-call-to-document-write-from-an-asynchronously-loaded-external-scrip#comment13842467_7812160). Thanks, -David Phillips -----Original Message----- From: mlabs [mailto:[email protected]] Sent: Monday, August 06, 2012 9:55 PM To: [email protected] Subject: contributing external javascript resources I have a page that renders a googleapi map in a wicket panel. Works great. I thought I would optimize things a bit by having the panel contribute the googleapi javascript reference to the header, instead of having it permanently referenced in the page header irrespective of whether the map panel is visible or not... so I override renderHead() in my panel like so: public void renderHead(IHeaderResponse response){ response.renderJavascriptReference(""http://maps.googleapis.com/maps/api/js?sensor=false", "gmap-api"); } however, this doesn't work.. and in the browser javascript debugger I see this: Warning: A call to document.write() from an asynchronously-loaded external script was ignored. Source File: http://maps.googleapis.com/maps/api/js?sensor=false Q:what is the correct way to contribute external javascript references to the header? TIA -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/contributing-external-javascript-resources-tp4651029.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
