[ 
https://issues.apache.org/jira/browse/WICKET-2911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-2911.
-----------------------------------

         Assignee: Igor Vaynberg
    Fix Version/s: 1.5-M2
       Resolution: Fixed

this is fixed in 1.5, but even so, intercept urls are not really supported 
during ajax requests. the best we can do during an ajax request is to redirect 
back to the page that caused the intercept redirect in the first place. unlike 
during a normal request, we cannot invoke the component action  because we have 
no ajax pipeline on the clientside that can properly handle the response.

> continueToOriginalDestination does not work with mountBookmarkablePage and 
> AjaxLink
> -----------------------------------------------------------------------------------
>
>                 Key: WICKET-2911
>                 URL: https://issues.apache.org/jira/browse/WICKET-2911
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.8
>         Environment: Java 1.5, Jetty 6.1.4
>            Reporter: Conny Kuehne
>            Assignee: Igor Vaynberg
>             Fix For: 1.5-M2
>
>         Attachments: redirectproblem.zip
>
>
> I ran into the problem when I used @AuthorizeInstantiation annotations to 
> protect ajax components from unauthorized instantiation. I reproduced without 
> the use of a authorization strategy as follows: 
> in HomePage
> add(new AjaxLink<Void>("ajaxLink") {
>                       @Override
>                       public void onClick(AjaxRequestTarget target) {
>                               throw new 
> RestartResponseAtInterceptPageException(RedirectPage.class);
>                       }
>               });
> In RedirectPage.class
> public void onSubmit() {
>                               super.onSubmit();
>                               continueToOriginalDestination();
>                       }
> If I first click the link in HomePage and then in submit the form in the 
> RedirectPage I get
> ERROR - WicketFilter               - closing the buffer error
> java.lang.NullPointerException
>       at org.mortbay.jetty.Response.sendRedirect(Response.java:397)...
> (When I use it with mvn jetty:run I get a "No context on this server matched 
> or handled this request." after the submit)
> This happens only when I use a AjaxLink and mount the HomePage 
> (mountBookmarkablePage("/mounted/path", HomePage.class);)
> With a non-ajax link or unmounted pages it works fine.
> I will attach a Quickstart.zip. Run in Eclipse to see the "ERROR - 
> WicketFilter               - closing the buffer error"
>  

-- 
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