Hi Guys,

I have the following in a module actions.class.php:

class myPageActions extends sfActions
{
  public function executeIndex(sfWebRequest $request)
  {
      $q = Doctrine_Query::create()->from('table t');
      $this->items = $q->execute();
  }

  public function executeNew(sfWebRequest $request)
  {
      $this->getUser()->setFlash('notice','This is just a message.');
      $this->redirect('myPage/index');
  }
}

And in the layout.php for my application I have:

<?php if ($sf_user->hasFlash('notice')): ?>
  <div class="flash_notice">
    <?php echo $sf_user->getFlash('notice') ?>
  </div>
<?php endif; ?>

If I load myPage/new  I do get redirected to myPage/index but the Flash
message is not there, however once redirected if I reload the browser
page (hit reload button) the flash message shows up just fine.

The http header I get when redirected from new to index shows that the
browser loads the index page from the browser's cache and thus it
prevents the flash message from being shown unless I reload the page,
how can I stop this from happening ? is there a setting I may be missing
here ?

I hope my explanation of the issue is clear enough, thank you very much
for your help.

Regards.

--
Luis MagaƱa

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to