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 15:18:05 UTC

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

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

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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3612.
-------------------------------------

    Resolution: Duplicate

Duplicate of WICKET-3473

> 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

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

Posted by "david (JIRA)" <ji...@apache.org>.
    [ 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

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

Posted by "Attila Király (JIRA)" <ji...@apache.org>.
    [ 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

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

Posted by "david ruescas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021025#comment-13021025 ] 

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

I see that issue 3473 has Fix version 1.5RC3, but thats the version that I found the problem with. 

Should I assume that the problem will be fixed after 1.5RC3?

> 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

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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reopened WICKET-3612:
-------------------------------------


Please attach a quickstart application.
The browser is not important.

> 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

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

Posted by "david (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019350#comment-13019350 ] 

david edited comment on WICKET-3612 at 4/13/11 2:26 PM:
--------------------------------------------------------

See attached example.zip

(Must adjust the environment-specific numbers used to download the javascript file in the head section of homepage.html)

      was (Author: fastness):
    Must adjust the environment-specific numbers used to download the javascript file in the head section of homepage.html
  
> 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
>         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

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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3612.
-------------------------------------

    Resolution: Duplicate

Duplicate of WICKET-3596

> 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

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

Posted by "david (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

david updated WICKET-3612:
--------------------------

    Attachment: example.zip

Must adjust the environment-specific numbers used to download the javascript file in the head section of homepage.html

> 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
>         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

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

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021027#comment-13021027 ] 

Martin Grigorov commented on WICKET-3612:
-----------------------------------------

Yes, it is reopened and will be fixed for RC4

> 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