can you set a breakpoint and see where response.redirect is being called
from for ajax processing? i can see it would be called if you added the page
itself to the ajaxrequesttarget.

as far as supporting stateless ajax goes, i am not sure if or when we are
going to support it. we are not going to look into it until we start working
on 1.5 (a month or two). the focus of wicket has never been stateless pages.

-igor

On Fri, Oct 17, 2008 at 4:11 AM, aditsu <[EMAIL PROTECTED]> wrote:

>
> Hi, I managed to hack wicket (1.4-m3) to do a kind of stateless ajax link.
> I extended AbstractLink and implemented ILinkListener, and added a custom
> stateless AjaxEventBehavior that creates a callback url using the
> ILinkListener interface (in order to get a
> BookmarkableListenerInterfaceRequestTarget).
> In onLinkClicked, I create an AjaxRequestTarget and then call an abstract
> handler.
>
> This is already a nasty hack, however it doesn't work yet by itself.
> BookmarkableListenerInterfaceRequestTarget.processEvents calls
> getPage(requestCycle) if it can't find a page, and that method creates a
> new
> page... but only if !requestCycle.isRedirect(). And isRedirect returns true
> for ajax requests.
> getPage is also final (why?) so I had to override processEvents to make it
> work.
> What does isRedirect mean anyway? And why is it true for all ajax requests?
>
> After hacking that, the stateless ajax link worked, however when I tried to
> add a stateful form to the page through it, it didn't work because the page
> wasn't stored in the session. I had to use yet another hack - I called
> getRequestCycle().urlFor(getPage()) because that seems to touch the page in
> the session.
>
> So everything seems to work now, however I don't like having to use these
> hacks, and I wonder if I broke anything by using them (especially the page
> creation on redirect). Is there any better way to do ajax stateless links?
> Is wicket going to support that anytime soon?
>
> Thanks
> Adrian
> --
> View this message in context:
> http://www.nabble.com/Stateless-AJAX-links-tp20031309p20031309.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