You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Richard W. Adams" <RW...@UP.COM> on 2012/02/01 21:43:16 UTC
SetResponsePage & Ajax
I'm having a hard time understanding what happens when setResponsePage()
is called while processing an Ajax request. Does Wicket:
1. Render the response page's HTML & send it back through the Ajax
connection?
2. Tell the browser to make a new request (i.e., redirect) to the new
page?
3. Something else?
This question is part of larger problem I'm trying to solve: Getting
feedback messages to appear on the response page. In my scenario, I make
an Ajax request to perform a transaction. If it fails, I stay on the
current page & display an error feedback panel. That works fine. If the
transaction succeeds, I want to go the next page (the response page), but
I may or may not have warning or info feedback to show there. It's not
working smoothly, & I suspect the problem is I'm misunderstanding
something about how response pages work with Ajax.
**
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
**
Re: SetResponsePage & Ajax
Posted by Sven Meier <sv...@meiers.net>.
Take a look at WebPageRenderer#respond(): Inside Ajax requests it
responds with a redirect, which is then analyzed and performed by
wicket-ajax.js in the browser.
Sven
On 02/01/2012 09:43 PM, Richard W. Adams wrote:
> I'm having a hard time understanding what happens when setResponsePage()
> is called while processing an Ajax request. Does Wicket:
>
> 1. Render the response page's HTML& send it back through the Ajax
> connection?
>
> 2. Tell the browser to make a new request (i.e., redirect) to the new
> page?
>
> 3. Something else?
>
>
> This question is part of larger problem I'm trying to solve: Getting
> feedback messages to appear on the response page. In my scenario, I make
> an Ajax request to perform a transaction. If it fails, I stay on the
> current page& display an error feedback panel. That works fine. If the
> transaction succeeds, I want to go the next page (the response page), but
> I may or may not have warning or info feedback to show there. It's not
> working smoothly,& I suspect the problem is I'm misunderstanding
> something about how response pages work with Ajax.
>
> **
>
> This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.
> **
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org