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

Martin Tzvetanov Grigorov commented on WICKET-6840:
---------------------------------------------------

The problem starts with: 
https://issues.apache.org/jira/browse/WICKET-6703?focusedCommentId=16962037&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16962037

 

Now org.apache.wicket.page.PartialPageUpdate#writeTo() writes the prepend 
evaluations and then the components. But Component/Behavior #beforeRender and 
#renderHead() are part of PartialPageUpdate#writeComponents() and if they use 
something like:
{code:java}
component.getRequestCycle().find(IPartialPageRequestHandler.class).ifPresent(target
 -> {
   final String javascript = "var e = Wicket.$('" + getMarkupId() +
      "'); if (e != null && typeof(e.parentNode) != 'undefined') 
e.parentNode.removeChild(e);";

   target.prependJavaScript(javascript);
}); {code}
as AjaxIndicatorAppender does then it is just ignored.

> Busy indicator persists after request
> -------------------------------------
>
>                 Key: WICKET-6840
>                 URL: https://issues.apache.org/jira/browse/WICKET-6840
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core, wicket-extensions
>    Affects Versions: 9.0.0, 9.1.0
>         Environment: Linux - Ubuntu 19.10 and centOS. Using OpenJDK 14.
>            Reporter: Ronald Cruz
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Minor
>         Attachments: test_proj.zip
>
>
> The busy indicator (implementations of `IAjaxIndicatorAware`) appears to 
> persist after the AJAX request finishes. To be precise, It looks like it's 
> not being properly cleaned up, as subsequent requests continue to add new 
> indicators to the page. This looks to be new in Wicket 9/9.1, as I didn't 
> observe the behavior in the past (Wicket 7/8) out of the box.
> I've seen this occur with uses of `IndicatingAjaxLink.java` along with 
> ModalWindow/ModalDialog, but also for use cases of the vanilla 
> `AjaxIndicatorAppender` behavior attached to a component.
> I've attached a small quickstart project which should hopefully make this 
> easy to reproduce. It should suffice to start the project and click any of 
> the two links present.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to