Hi, I thought about what you said, and debugged some more. Here's what I
found out:


Johan Compagner wrote:
> 
> RequestCycle.isRedirect() is right, because that is a call that tells us
> must i redirect of i get a page redirect
> and with ajax this is always the case.
> 
> Problem is that the BookmarkablePageRequestTarget.getPage(RC) should only
> create a page when it is not a redirect
> And that also correct.
> 

Actually, neither BehaviorRequestTarget nor AjaxRequestTarget ever check for
redirect. As long as the target is not changed to something else, the
redirect setting is ignored.
AFAICT, the redirect-for-ajax thing is there so that *if* the *final*
request target is something other than AjaxRequestTarget, it will cause a
redirect.
E.g. if in my handler method I set the response page to a bookmarkable page,
then it should do a redirect indeed (that is, a javascript redirect, not an
http 302).

The problem is that my initial target is
BookmarkableListenerInterfaceRequestTarget, before changing to
AjaxRequestTarget, and wicket doesn't expect that. It sees a non-ajax target
for an ajax request, so it just blindly says "this is a redirect", when
actually I'm not gonna do that.

So I think isRedirect should NOT check for ajax unless it's at the RESPOND
step. In the PROCESS_EVENTS step it should only check for the redirect flag.
That would probably solve my problem and at the same time it would start to
make sense. What do you think?

Adrian

-- 
View this message in context: 
http://www.nabble.com/Stateless-AJAX-links-tp20031309p20193967.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to