Issue with redirect it seems to be some particular issue with: http://code.google.com/apis/loader/ Espessialy with "google.load" function. That seems to be solved by forming URL in following way:
https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221%22%2C%22packages%22%3A%5B%22corechart%22%5D%7D%5D%7D I mean "autoloading" feature. But in case of AJAX there is some more issue: Script mentioned above was loaded later than script loaded as: response.renderOnDomReadyJavaScript(script); And unfortunatly that leads to JavaScript error in last script, because it depends upon previous (that still haven't been loaded). P.S. Google API have feature to invoke some function by name after loading. Now I'm trying to use it as workaround: but there is some problem: if google jsapi was alredy loaded - my function doesn't invoked... Thanks, Ilia 2011/11/29 Martin Grigorov <[email protected]> > Ticket + quickstart. > > We load .js resources from CDN in our app and there are no problems. > > 2011/11/29 Илья Нарыжный <[email protected]>: > > Martin, > > > > Thank you, but in Wicket 1.5.3 browser come to some inconsistent state > > after that. > > > > 1) Browser fully redirected to google js page > > 2) In logs I have: > > Wicket is not defined > > Wicket.Log.error("Wicket.FunctionsExecuter.processNext: " + e); > > > > Thanks, > > > > Ilia > > > > > > 2011/11/29 Martin Grigorov <[email protected]> > > > >> https://issues.apache.org/jira/browse/WICKET-4092 > >> > >> On Tue, Nov 29, 2011 at 3:20 PM, Илья Нарыжный <[email protected]> wrote: > >> > Hello, > >> > > >> > I have following code in my wicket component: > >> > <wicket:head> > >> > <script type="text/javascript" src="http://www.google.com/jsapi > >> "></script> > >> > </wicket:head> > >> > > >> > Everything is OK if component is visible from the begining. But if > >> > component is enabled by AJAX, I have following in the logs: > >> > > >> > *INFO: * > >> > Initiating Ajax POST request on > >> > 1?3-1.IBehaviorListener.0-form-mbkView&random=0.5660016379886397 > >> > *INFO: *Invoking pre-call handler(s)... > >> > *INFO: *Received ajax response (2739 characters) > >> > *INFO: * > >> > <?xml version="1.0" > >> > encoding="UTF-8"?><ajax-response><header-contribution><![CDATA[<head > >> > xmlns:wicket=" > >> > http://wicket.apache.org"> > >> > <script type="text/javascript" src="http://www.google.com/jsapi > >> "></script> > >> > </head>]]></header-contribution><component id="dataHolder1f" > >> >><![CDATA[<div id="dataHolder1f"> > >> > <div> > >> > <div id="chart_div"></div> > >> > </div> > >> > </div>]]></component><evaluate > >> > encoding="wicket1">...........</evaluate></ajax-response> > >> > *INFO: *Response parsed. Now invoking steps... > >> > *INFO: * > >> > *INFO: *Initiating Ajax GET request on http://www.google.com/jsapi > >> > *INFO: *Invoking pre-call handler(s)... > >> > *INFO: *Received ajax response (0 characters) > >> > *INFO: *Invoking post-call handler(s)... > >> > *INFO: *returned focused element: [object HTMLSelectElement] > >> > *INFO: *returned focused element: [object HTMLSelectElement] > >> > *ERROR: * > >> > Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: > >> > ReferenceError: google is not defined > >> > *INFO: *Response processed successfully. > >> > > >> > And in console: > >> > > >> > Request: > >> > > >> > OPTIONS /jsapi HTTP/1.1 > >> > Host: www.google.com > >> > User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 > >> Firefox/8.0 > >> > > >> > Response: > >> > > >> > HTTP/1.1 405 Method Not Allowed > >> > Content-Length: 0 > >> > Content-Type: text/html > >> > Date: Tue, 29 Nov 2011 13:40:26 GMT > >> > Server: GFE/2.0 > >> > > >> > > >> > So, why wicket needs in OPTIONS for script inclusion? Can I somehow > >> > disable that kind of request? > >> > > >> > Thanks, > >> > > >> > Ilia > >> > > >> > >> > >> > >> -- > >> Martin Grigorov > >> jWeekend > >> Training, Consulting, Development > >> http://jWeekend.com > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
