GitHub user disblader opened a pull request:

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

    Fixed WicketTester to detect components in enclosure when doing 
isComponentOnAjaxResponse.

    When a component is in a wicket:enclosure and is then correctly re-rendered 
using ajax, WicketTester seemed to not be able to detect that the component was 
in the ajax response in the isComponentOnAjaxResponse method. 
    
    I added additional functionality where [isComponentOnAjaxResponse](url) 
tries to find an enclosure whose child is the given component, and if one is 
found, it recurses into isComponentOnAjaxResponse passing the enclosure as an 
argument.
    
    In order not to duplicate logic detecting when an enclosure's child is a 
given component, I made AjaxEnclosureListener's isControllerOfEnclosure public 
and static.
    
    Accompanies a test verifying the behavior. I'm not sure what the convention 
is like for testing new features was, so currently there's only one test. Do 
let me know if additional tests are needed.

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

    $ git pull https://github.com/disblader/wicket enclosure-ajax-test

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

    https://github.com/apache/wicket/pull/224.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 #224
    
----
commit 35b1642727515e0b2eb60f1f0bc9fa046351d4ca
Author: Domas Poliakas <[email protected]>
Date:   2017-07-27T11:19:42Z

    isComponentOnAjaxResponse now checks whether a component's enclosure is on 
ajax response

commit 534baa205f7c6a08418fe77a97dff0d8b81166ae
Author: Domas Poliakas <[email protected]>
Date:   2017-07-27T13:16:21Z

    Tests for new functionality

commit 84addcc6a83232e849cb80887da2303b7ec17ca1
Author: Domas Poliakas <[email protected]>
Date:   2017-07-27T13:27:26Z

    Forgot to add a license

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to