[ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020755#comment-13020755 ]
Attila Király commented on WICKET-3612: --------------------------------------- Confirming that the attached quickstart application is failing with both 1.5-RC3 and current 1.5 trunk. With both version I get the following JS stack trace in Chrome (only the line numbers differ): Uncaught TypeError: Object #<Object> has no method 'script1' (anonymous function) :8080/wicket-3612/?1:2454 Wicket.Head.addElement wicket-ajax-ts1301905564345.js:1701 Wicket.Head.addJavascript wicket-ajax-ts1301905564345.js:1760 steps.push.onLoad wicket-ajax-ts1301905564345.js:1646 Wicket.Ajax.Request.stateChangeCallback wicket-ajax-ts1301905564345.js:1013 This issue is probably related to WICKET-3473 because Pedro's patch (attached on 13/Apr/11) from that fixes this issue too. > 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 ruescas > Attachments: example.zip > > > 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