I have created a wiki page with my solution for stateless Ajax at
http://cwiki.apache.org/confluence/display/WICKET/A+StatelessAjaxFallbackLink.


jcompagner-2 wrote:
> 
> we dont know that really if it is the respond step
> And normally that getPage() isnt called in wicket when not in a Response
> step
> 
> what you do is currently not supported by wicket
> having an ajax behavior request to a stateless page (through a
> BookmarkableListenerInterfaceRequestTarget)
> so i guess the fix is in processEvents is not doing this:
> 
> else if (page == null)
>             {
>                 page = getPage(requestCycle);
>             }
> 
> but
> 
> else if (page == null)
>             {
>                 page = newPage(getPageClass(), requestCycle);
>             }
> 
> johan
> 
> 
> 
> On Mon, Oct 27, 2008 at 7:51 PM, aditsu <adi...@yahoo.com> wrote:
> 
>>
>> 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: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to