2009年8月7日星期五

Re: [fw-mvc] Lost flash messages after redirect

Abraham Block <atblock@gmail.com> wrote:
> No, that does not make sense. The point of a flash message is to transport a message to the next immediate request. Usually when you have a "POST-REDIRECT-GET" scenario.
> Why does the page have to make a second redirect?

Abraham, I do realize that the flash message lasts one request and is
use in a "POST-REDIRECT-GET" scenario.

The reason I want to do this is simple: I perform an action to a
resource and then I'm redirected back to the list with the resource.
But because there is a requirement that this list "remembers" it's
sorting and sorting parameters are passed via the url I need to make a
second redirect to the resource list (from itself) if there is no
sorting to put the last saved one in the url.

Carlton Gibson <lists@noumenal.co.uk> wrote:
> If you perform the redirect before you retrieve your message from the FlashMessenger then this won't be a problem.

This is not true - at least not by the code in
Zend_Controller_Action_Helper_FlashMessenger.

--
My place to share my ideas:
http://bolddream.com (now live :)

没有评论: