no setting a response is not also implied that it is a redirect.
That doesn't have to be the case.

But setting a response to null
and then redirecting youreself to another page
should work. Because in the response phase we aren't seeing that a response page and we do nothing..

setting the response page (to an instance so not null) AND redirecting to it (or another) that is illegal.

can you look in the debugger why RequestCycle.respond:

private final void respond() throws ServletException
   {
       // Get any page that is to be used to respond to the request
       final Page page = getResponsePage();
       if (page != null)
       {

still has a page there? And which one it is?

johan

David Liebeherr wrote:
Johan Compagner wrote:

you are trying to redirect to a page that has that warning and when the press ok they should return to the page where they pressed to delete that account? (where lays the real delete code?)

I simplified the code for the mail :-)
But thanks for the question. as i read it i got an idea to make my code even better..

but setting the responsepage to null should work.
Somehow in the response phase we also see a response page. Why and when that is exactly set i don't know yet.

Setting the Response Page doesn't work.
I still got the error..
And it can't work since i found out that setResponsePage does not set the private field redirect (boolean) from the RequestCycle Object (if i recall correctly).
But the following works:
setRedirect(false)
redirectToInterceptPage(...);

Thanks for your replies.
Dave

johan



David Liebeherr wrote:

Hi all!

I have a problem with the redirectToInterceptPage.
I have this:
               listItem.add(new Link("delete") {
                   public void onClick() {
                           setResponsePage((Page) null);
redirectToInterceptPage(new Confirmation("delete_ftpaccount", "Do you realy want to delte this ftp-account?"));
                   }
               });

I get the following Error:
wicket.WicketRuntimeException: Already redirecting to '/test/serverConfig;jsessionid=E4E42D4494F7156FF2B6D65412CF30EF.node1?path=5'. Cannot redirect more than once wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:96) wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:249)
wicket.RequestCycle.respond(RequestCycle.java:771)
wicket.RequestCycle.request(RequestCycle.java:406)
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:304)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Any suggestions how to solve this?

Thanks,
Dave


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to