You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "vineet semwal (Commented) (JIRA)" <ji...@apache.org> on 2012/01/07 14:08:39 UTC

[jira] [Commented] (WICKET-4326) Introduce IAjaxRequestHandler in all onClick(), onEvent(), ... methods to make it easier for using different impls and for testing/mocking

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

vineet semwal commented on WICKET-4326:
---------------------------------------

martin-g :i think do this in 6.0 and do 4327 in 1.5.x as its very easy to do 4327,if you do 4327,there will not be any need to mock AjaxRequestTarget but if you do do 4327 also add getters for prependscripts and appendscripts in ART ;)
                
> Introduce IAjaxRequestHandler in all onClick(), onEvent(), ... methods to make it easier for using different impls and for testing/mocking
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4326
>                 URL: https://issues.apache.org/jira/browse/WICKET-4326
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>         Attachments: WICKET-4326.patch
>
>
> AjaxRequestTarget is a class with many final methods and constructor which relies on ThreadLocal (RequestCycle.get()) which makes it difficult to mock it for testing.
> By introducing IAjaxRequestHandler interface this problem will be solved. This additionally will allow to provide custom implementation which may generate JSON ajax response instead of XML.
> The change is simple but it changes the signature of all onXyz() (onEvent, onClick, onUpdate, ...) methods and this will cause a lot of compilation errors.
> The fix is quite easy though: replace AjaxRequestTarget with IAjaxRequestHandler.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira