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

Sven Meier commented on WICKET-6663:
------------------------------------

Your show-case mixes Ajax with non-Ajax requests: While the visibility is 
toggled (via Ajax), the link is requested immediately (via non-Ajax) and hits 
the invisible component -> ListenerInvocationNotAllowedException.

If your SimpleRefreshLink extended AjaxLink, you'd see Wicket's protection 
against this: the second Ajax request is queued, then aborted since the 
component is no longer in the DOM (regardless of the usage of 
#setOutputMarkupId()).

So yes, there's a pitfall with parallel Ajax/non-Ajax requests you weren't 
aware of and we should try to improve our documentation on.

Note that the changes in WICKET-6575 were specifically meant to address the 
problem of consecutive *Ajax* requests on placeholders, which indeed now no 
longer run into ListenerInvocationNotAllowedExceptions.

As a general solution for handling ListenerInvocationNotAllowedExceptions you 
can use a custom IExceptionMapper (or IRequestCycleListener) that drops these 
exceptions.

> Don't prevent requests on component placeholders (revert WICKET-6575)
> ---------------------------------------------------------------------
>
>                 Key: WICKET-6663
>                 URL: https://issues.apache.org/jira/browse/WICKET-6663
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 8.1.0
>            Reporter: Hans Schäfer
>            Priority: Major
>         Attachments: wicket-case.tgz
>
>
> Hello!
> WICKET-6575 introduced a bug in my application.
> I explicitly make an Ajax-Call to an invisible component. In my case: this 
> component displays search results as soon as they are available. The call is 
> triggered by a script created by another (visible) component.
> The method "canCallListener" already models the behavior of 
> components/behaviors regarding invocations. If you make Ajax-Calls to 
> invisible components you can hook in here (the default-Implementation causes 
> an exception if component is invisible) and make processing possible. This 
> was a consistent server-side API until Wicket-6575.
> Please remove the changes of Wicket-6575. 
> Thanks
> Hans
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to