You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Joost Schouten (ml)" <jo...@jsportal.com> on 2011/05/23 11:12:16 UTC

[T5.2.5] Ajax redirectURL does not work when invoked though ComponentRequestFilter

  Hi,

When an AJAX event handler method returns a Page the following response 
is generated which nicely redirects me to the page.

{
   "redirectURL" : 
"/jsportal-projectportal-client-tapestry/nl/secured/project/overview/3603"
}

When the same is generated though the process of the 
ComponentRequestFilter [1] this response is generated which does not work.

{'redirectURL':'https://localhost:8443/jsportal-projectportal-client-tapestry/nl/login'}

When debuging the the javascript the reply is null but I can't seem to 
find why this is. Does anyone have any idea why this stopped working?

Thanks,
Joost



[1] part of my ComponentRequestFilter:

public void handleComponentEvent(ComponentEventRequestParameters parameters,
                                      ComponentRequestHandler handler) 
throws IOException {
             .......

                 String loginPage = 
componentClassResolver.resolvePageClassNameToPageName(logonService.getLogonPage().getName());

                 event = new ComponentEventRequestParameters(loginPage,
                         loginPage, "", EventConstants.ACTIVATE, 
emptyEventContext, emptyEventContext);
             .......

             handler.handleComponentEvent(event);
         }
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.2.5] Ajax redirectURL does not work when invoked though ComponentRequestFilter

Posted by "Joost Schouten (ml)" <jo...@jsportal.com>.
  My bad. My own code was generating this response from a dark little 
neglected corner.

On 23/05/11 11:12 AM, Joost Schouten (ml) wrote:
>  Hi,
>
> When an AJAX event handler method returns a Page the following 
> response is generated which nicely redirects me to the page.
>
> {
>   "redirectURL" : 
> "/jsportal-projectportal-client-tapestry/nl/secured/project/overview/3603"
> }
>
> When the same is generated though the process of the 
> ComponentRequestFilter [1] this response is generated which does not 
> work.
>
> {'redirectURL':'https://localhost:8443/jsportal-projectportal-client-tapestry/nl/login'} 
>
>
> When debuging the the javascript the reply is null but I can't seem to 
> find why this is. Does anyone have any idea why this stopped working?
>
> Thanks,
> Joost
>
>
>
> [1] part of my ComponentRequestFilter:
>
> public void handleComponentEvent(ComponentEventRequestParameters 
> parameters,
>                                      ComponentRequestHandler handler) 
> throws IOException {
>             .......
>
>                 String loginPage = 
> componentClassResolver.resolvePageClassNameToPageName(logonService.getLogonPage().getName());
>
>                 event = new ComponentEventRequestParameters(loginPage,
>                         loginPage, "", EventConstants.ACTIVATE, 
> emptyEventContext, emptyEventContext);
>             .......
>
>             handler.handleComponentEvent(event);
>         }
>     }


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org