You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/04/25 11:05:15 UTC

[jira] [Resolved] (WICKET-5553) When using an Ajax request to display initially hidden components inside inline enclosures, only the first one appears.

     [ https://issues.apache.org/jira/browse/WICKET-5553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-5553.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.16.0
                   7.0.0
         Assignee: Martin Grigorov

> When using an Ajax request to display initially hidden components inside inline enclosures, only the first one appears.
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5553
>                 URL: https://issues.apache.org/jira/browse/WICKET-5553
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.14.0
>         Environment: Windows, Java 7
>            Reporter: James Flagg
>            Assignee: Martin Grigorov
>             Fix For: 7.0.0, 6.16.0
>
>         Attachments: TestAjaxWithMultipleInlineEnclosures.html, TestAjaxWithMultipleInlineEnclosures.java, wicket5553.zip
>
>
> Consider a simple page with an Ajax link and two initially hidden labels, each of which is inside its own inline enclosure.  Clicking the link makes the labels visible and adds each to the AjaxRequestTarget. 
> Here is the behavior I see:  Upon initial page render, each of the two labels is rendered as a hidden inline enclosure div.  This is correct.  But upon clicking the Ajax link, only the first label appears, and I get an AJAX DEBUG error indicating that the second label couldn't be found.
> I've isolated the issue.  In the class org.apache.wicket.protocol.http.AjaxEnclosureListener, there is a call to "visit.stop(key)".  This halts the entire visitation, and therefore only the first inline enclosure is added to the AjaxRequestTarget.
> The fix, IMO, would be to simply remove the current key from the map once an enclosure is added to the target.  Don't call stop, and get rid of the local variable "key" which limits the logic of AjaxEnclosureListener to a single enclosure.
> It was working for multiple enclosures prior to the checkin of 2013-08-06.



--
This message was sent by Atlassian JIRA
(v6.2#6252)