Create a quickstart that demonstrates this and attach it to a JIRA.

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, May 14, 2010 at 7:31 AM, Lorenzo Bolzani <l.bolz...@gmail.com>wrote:

> Hi all,
> I have a quite simple composition of panels with the innermost panel
> containing a form.
> In the form there is an AjaxSubmitLink. In the onSubmit of the link
> there is this line
>
> target.addComponent(feedback);
>
> When I click the link using Firebug in Firefox I can see that a POST
> is sent to this URL
>
>
> http://localhost:9090/?wicket:interface=:3:products:newItemDetails:editor:entity:actionBar:save::IActivePageBehaviorListener:0:1&wicket:ignoreIfNotActive=true
>
> the content is a standard multi-part submit, I can post it if useful.
>
> The server responds with this ajax-response
>
> <?xml version="1.0" encoding="UTF-8"?><ajax-response><component
> id="newItemDetailse" ><![CDATA[<div wicket:id="newItemDetails"
> id="newItemDetailse"><wicket:panel>
>   <span wicket:id="view"><wicket:panel>
> </wicket:panel></span>
>
> </wicket:panel></div>]]></component><header-contribution
> encoding="wicket1" ><![CDATA[<head
> xmlns:wicket="http://wicket.apache.org";><script type="text/javascript"
>
> src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
> <script type="text/javascript"
>
> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
> <script type="text/javascript"
>
> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
> <script type="text/javascript"
> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> wicketAjaxDebugEnable=true;
> /*-->]^]^>*/</script>
> ...
>
> Then firefox tries to download the file wicket-event.js from this URL
>
>
> http://localhost:9090/purchase/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
>
> and gets a 404 error. "purchase" is the mount name of the starting
> page (mounted using a MixedParamHybridUrlCodingStrategy). The webapp
> does not have a context, it's "mounted" on the root of the webserver.
>
> Instead the file is actually available on this URL
>
>
> http://localhost:9090/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
>
> For comparison, In the headers of the very first page, the one
> containing the link, there is this line
>
> <script type="text/javascript"
>
> src="../resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
>
> and this works correctly.
>
> I found in the dubugger where the headers for the ajax-response are
> built and I arrived at WebRequestCodingStrategy.encode, line 830. Here
> the path is always built as fixed path, dots are never prepended.
>
>
> Now I'm a little confused.
>
> Firefox ask first asks for this URL http://localhost:9090/. The
> response contains relative URLs so I would expect for Firefox to
> consider these as relatives to the requested URL. So the next request
> should be the correct one. Instead FF adds a "purchase" fragment in
> the URL. Why? Is this the expected behaviour for an ajax-request?
>
>
> Any suggestion to fix this problem? At this time I can easily debug
> this problem so I can provide any extra info.
>
>
> Bye
>
> Lorenzo
> --
> La TV uccide. Se vuoi puoi smettere.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to