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

ASF GitHub Bot commented on WICKET-6528:
----------------------------------------

GitHub user dashorst opened a pull request:

    https://github.com/apache/wicket/pull/265

    WICKET-6528 Don't block user when component not on Page using AJAX

    Re-instate the behavior that was in versions < 8.0 that a component
    added to an AjaxRequestTarget but is not part of the page, would be
    ignored (or failed to refresh with an error in the JavaScript console).
    
    So instead of always throwing an error, we only do so in DEVELOPMENT
    mode causing an error page, and in DEPLOYMENT mode we only log the
    fault, but don't break the application hard for the user: the component
    refresh is ignored, just as it would've been in versions prior to 8.
    
    Fixes WICKET-6528

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/wicket WICKET-6528

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/wicket/pull/265.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #265
    
----
commit 60c94cd6927a2ec6962639ead96f57f127f954e5
Author: Martijn Dashorst <martijn.dashorst@...>
Date:   2018-02-05T12:57:54Z

    Don't block user when component not on Page using AJAX
    
    Re-instate the behavior that was in versions < 8.0 that a component
    added to an AjaxRequestTarget but is not part of the page, would be
    ignored (or failed to refresh with an error in the JavaScript console).
    
    So instead of always throwing an error, we only do so in DEVELOPMENT
    mode causing an error page, and in DEPLOYMENT mode we only log the
    fault, but don't break the application hard for the user: the component
    refresh is ignored, just as it would've been in versions prior to 8.
    
    Fixes WICKET-6528

----


> Component part of Page check in AjaxRequestHandler breaks applications
> ----------------------------------------------------------------------
>
>                 Key: WICKET-6528
>                 URL: https://issues.apache.org/jira/browse/WICKET-6528
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 8.0.0-M8
>            Reporter: Martijn Dashorst
>            Priority: Blocker
>             Fix For: 8.0.0
>
>
> The check if a component is part of the page hierarchy where an Ajax response 
> is generated for breaks client applications in a most unpleasant way. While 
> this check is good™, it should only generate errors in development mode. In 
> deployment mode it should ignore the component (like in versions prior to 
> Wicket 8) and log it as an error (which is expected: the application is in 
> error).
> See method `public void add(Component... components)` in AjaxRequestHandler 
> for more details.



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

Reply via email to