Use the FlashMessenger action helper, which does exactly what you want.
http://framework.zend.com/manual/en/zend.controller.actionhelpers.html
Matthias Coy-2 wrote:
>
> Hi there,
>
> class UsersController extends Zend_Controller_Action
> {
> public function deleteAction()
> {
> ....
> $user->delete;
> $this->view->messages = "user deleted";
> $this->_redirect('/users');
> }
> }
>
> this is my class. What I basically want to do is, delete the user (which
> is working), create a message, and redirect from /users/delete/id/5 to
> /users and then display the message. But it seems that the messages are
> ... lost because of the redirect, which makes sense, because _redirect
> ends up in a complete new View-Object which has no messages in it. So, the
> 'solution' I can think of is to put the messages in a Session-Namepace. Is
> this a good idea, or are there better ideas around?
>
> greetings
> matthias
>
>
--
View this message in context:
http://www.nabble.com/Zend_View-and-_redirect-tp18776094p18776605.html
Sent from the Zend Framework mailing list archive at Nabble.com.