atom feed11 messages in org.apache.wicket.usersadding resources after ajax swap
FromSent OnAttachments
Steve LowerySep 22, 2011 12:28 pm 
Igor VaynbergSep 22, 2011 12:42 pm 
Steve LowerySep 22, 2011 1:11 pm 
Igor VaynbergSep 22, 2011 1:13 pm 
Steve LowerySep 22, 2011 1:18 pm 
Igor VaynbergSep 22, 2011 1:20 pm 
Steve LowerySep 22, 2011 1:38 pm 
Igor VaynbergSep 22, 2011 1:42 pm 
PointbreakSep 22, 2011 2:22 pm 
Martin GrigorovSep 28, 2011 2:21 am 
Igor VaynbergSep 28, 2011 8:30 am 
Subject:adding resources after ajax swap
From:Steve Lowery (slow@gatessolutions.com)
Date:Sep 22, 2011 12:28:17 pm
List:org.apache.wicket.users

I'm having an issue using resources after an ajax swap, in this case jquery. My home page does not have anything jquery related on it. There is an AjaxFallbackLink which swaps out the main content. The new content Panel has a jquery header contributor. I see this is being returned in the response to the AjaxFallbackLink click:

<ajax-response><header-contribution encoding="wicket1" ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src=" https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script

</ajax-response>

However, I notice that the browser is attempting to retrieve the jquery resource via the OPTIONS method. It does not appear to be getting added to the head and therefore, my component fails because it tries to do some jQuery stuff but it isn't available.

Is this the expected behavior or am I doing something wrong? Do I have to load 3rd party libraries on the Page or register headerListener with the application? I have seen the same behavior with other javascript libraries (i.e. yui).