WicketTester does not accurately simulate scenario where entire page is added 
to AjaxRequestTarget
--------------------------------------------------------------------------------------------------

                 Key: WICKET-2328
                 URL: https://issues.apache.org/jira/browse/WICKET-2328
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4-RC4
            Reporter: Matt Brictson
            Priority: Minor
             Fix For: 1.4-RC6
         Attachments: myproject.zip

If the entire page is added to an AjaxRequestTarget, Wicket treats this a 
special case: the normal ajax flow is aborted and the browser is asked to 
refetch the page in a normal, non-ajax request.

For example, if this code is used:

public void onClick(AjaxRequestTarget tgt)
{
    tgt.addComponent(getPage());
}

This causes the browser to reload the page (you can see the location bar in the 
browser changing).

The problem is that WicketTester does not simulate this scenario correctly. If 
you use WicketTester to test the onClick() listener in the example above, the 
page is not re-rendered. You can verify this by instrumenting the 
onBeforeRender method for the page: it is never called.

So to summarize:

When the framework is run normally, AjaxRequestTarget.addComponent(Page) causes 
Wicket to start a completely new ajax request-response. However when the 
framework is run using WicketTester, a new request-response is not executed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to