Look at the java doc of the REDIRECT_TO XXXX variants.


We have 3 types. The default one is redirect_to_buffer and that renders a page to a buffer then submits a redirect
then when that redirect comes back from the browser. The buffer is send to it.


What you have set is that it sends a redirect and the page is only rendered in the redirect.
When you do this models will be detached an attached. You will get a different hibernate session (most likely)
So all objects must be get from the database again.

The question is why do you really need that voodoo on the real http request? As a wicket user you shouldn't
touch those objects. (ofcourse there could be thing where you need them but try to avoid it as much as possible)

What are you setting/using those objects for? And when?


On 10/7/05, Scott Sauyet <[EMAIL PROTECTED]> wrote:
Scott Sauyet wrote:
> Where during a Page's life cycle do I have access to the WebResponse for
> the page being requested? [ ... ]

In his response, Johan pointed out that one of the bugs I ran into was
fixed in RC2.  I upgraded to this, and that Exception was eliminated,
but my main problem remained.

I've fixed it, or perhaps worked around it, but would love to hear if
there is a better way.  I was stepping through some of the code and
noticed the bit in WebRequestCycle.redirectTo(final Page page) which in
part does this:

     final Response currentResponse = getResponse();
     final BufferedResponse redirectResponse = new BufferedResponse();
     setResponse(redirectResponse);
     page.doRender();
     setResponse(currentResponse);

and that seemed likely to have something with my problems allowing
Plumtree to do its voodoo on my HttpServletRequest/Response.  This code
fragment was inside an

     if ((settings.getRenderStrategy() ==
             ApplicationSettings.REDIRECT_TO_BUFFER) && // ...
     }

so to see what it might do, inside my WebApplication, I did

     settings.setRenderStrategy(ApplicationSettings.REDIRECT_TO_RENDER);

That seemed to fix my problem.  But I really don't know what I did
there, and if this is a bad default to mess with, or if there is simply
some other place I can easily interrupt the process to grab copies of
the ServletRequest/Response for the portal.

Any advice would be quite welcome.

Thanks,

   -- Scott



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to