Hello folks!
I have a symfony app that's puzzling me. Currently, as an action executes I
set a flash message saying the action succeeded or failed. I then return
sfView::SUCCESS or just let the action complete and return the success
template. I have a spot in the layout.php that looks for the flash message
and displays it (code for that section is below). However, if the user then
clicks on a new link or is redirected somehow, the message doesn't
disappear. I would think that a new request would clear the messages? Or is
it because it's layout.php that's displaying the message that it doesn't go
away?
I am running symfony 1.0.6 on Linux with Apache 1.3.37 and php 5.2.3.
Thanks for your help!
-Angelina Talley (code follows)
*snippet from layout.php: *
**
<?php if ($sf_flash->has('error')): ?>
<div class="error"><span><?php echo $sf_flash->get('error')
?></span></div><br />
<?php echo javascript_tag( nifty_round_elements( "div.error", "all")
) ?>
<?php endif;
if ($sf_request->hasErrors()): ?>
<div class="error"><span>Operation failed. Please see errors
below.</span></div><br />
<?php echo javascript_tag( nifty_round_elements( "div.error",
"all") ) ?>
<?php endif; ?>
<?php if ($sf_flash->has('success')): ?>
<div class="success"><span><?php echo $sf_flash->get('success')
?></span></div><br />
<?php echo javascript_tag( nifty_round_elements( "div.success",
"all") ) ?>
<?php endif; ?>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---