You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "david (JIRA)" <ji...@apache.org> on 2011/04/13 16:18:06 UTC

[jira] [Commented] (WICKET-3612) Ajax link does not update content which includes another ajax link until second (or further) click

    [ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019345#comment-13019345 ] 

david commented on WICKET-3612:
-------------------------------

I have tried patching the js with WICKET-3596.patch and the problem persists. I am not convinced this is a duplicate of 3596, in fact, this problem occurs in chrome as well.

> Ajax link does not update content which includes another ajax link until second (or further) click
> --------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3612
>                 URL: https://issues.apache.org/jira/browse/WICKET-3612
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5-RC3
>         Environment: jdk1.6.0_07, jetty:run, Firefox 4, Chrome 12, IE 7, Windows
>            Reporter: david
>
> Starting from a 1.5-RC3 quick start I have the following homepage.java and corresponding markup
> http://pastebin.com/C7nPE4Lb
> http://pastebin.com/kaUg960w
> The homepage contains a button, and a table with rows to be updated.
> The button is handled by AjaxFallbackLink, and add rows to the table.
> Each row contains a simple label and a link. This link also handled by AjaxFallbackLink (but it does nothing)
> When visiting the page for the first time, and clicking the button, there is no update to the page (no rows added to the table). I have verified with the ajax-debug dialog that the correct markup is returned to the browser, but the browser is not updating said markup.
> If the button is clicked a second time, the markup does update, and includes two rows, one for the current click, and one for the previous click which did not have any effect.
> Subsequent clicks work correctly.
> Further observations:
> * If I remove the link from the row of the table, the rows update correctly (the rows only contain the label)
> * If I change the link to a normal Link, instead of AjaxFallbackLink, the rows update correctly
> * I have verified with firebug that the first click of the button causes the following javascript file (and two others) to be downloaded
> http://localhost:8080/wicket/resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax-ts1302183319615.js
> this corresponds to this line in the response to the ajax button click response (as shown in ajax debug dialog):
> <script type="text/javascript" src="./wicket/resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax-ts1302183319615.js"></script>
> Upon loading the page in the browser and using view source I see this line in the normal markup:
> <script type="text/javascript" src="wicket/resource/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax-ts1302183319615.js"></script> 
> It seems the browser should not be downloading the same javascript file again, it should already have it from the original page load. The only difference between the two script tags is that the one found in the ajax response begins with "./wicket/.." and the normal page load with "wicket/.."
> *** If I manually add the script tag as found in the ajax response to the head section of the markup in homepage.html, the problem disappears (and the browser does not reload said javascript file on the ajax request) ***

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira