[symfony-users] Re: set/getFlash() issue : active during 2 requests

2009-07-21 Thread Adrien Mogenet

Hi,

Thanks for this piece of information... but, I don't use forward()
method :-(

You can see my whole mailing action here :
http://code.google.com/p/piwam/source/browse/trunk/apps/front/modules/association/actions/actions.class.php#116

--
Adrien
http://www.ze-technology.com

On 20 juil, 15:09, Richtermeister nex...@gmail.com wrote:
 Hey Adrien,

 you're using a forward() command after the mailing form, so the flash
 gets picked up in the current request and not unset until the next.
 If you use a redirect(), the flash will truly only be shown once. This
 is also best practice, since it avoids re-triggering the form by
 hitting refresh..

 Daniel

 On Jul 19, 8:49 am, Adrien Mogenet adrien.moge...@gmail.com wrote:

  Hi folks,

  I've noticed something strange in my symfony app.
  I have 2 forms : a mailing form and a configuration form. They both
  set a flash message once form has been submit in order to display a
  success/failure message.

  It works well, BUT, for example, if I submit my mailing form, I reach
  the 'mailing form' page again which displays my flash message, and
  then if I go to the configuration form, I still can see the flash
  message from my mailing form !

  According to the symfony configuration :
  Flash attributes are a clean way of passing information to the *very
  next* request.

  Well, I don;t understand what happened...

  Adrien
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: set/getFlash() issue : active during 2 requests

2009-07-20 Thread Richtermeister

Hey Adrien,

you're using a forward() command after the mailing form, so the flash
gets picked up in the current request and not unset until the next.
If you use a redirect(), the flash will truly only be shown once. This
is also best practice, since it avoids re-triggering the form by
hitting refresh..

Daniel



On Jul 19, 8:49 am, Adrien Mogenet adrien.moge...@gmail.com wrote:
 Hi folks,

 I've noticed something strange in my symfony app.
 I have 2 forms : a mailing form and a configuration form. They both
 set a flash message once form has been submit in order to display a
 success/failure message.

 It works well, BUT, for example, if I submit my mailing form, I reach
 the 'mailing form' page again which displays my flash message, and
 then if I go to the configuration form, I still can see the flash
 message from my mailing form !

 According to the symfony configuration :
 Flash attributes are a clean way of passing information to the *very
 next* request.

 Well, I don;t understand what happened...

 Adrien
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---