views:

35

answers:

1

How to hold a flash message even after 2 consecutive redirects? I set my flash message in my controller and there are 2 redirects happening because of a plugin which i cannot control.But still I want the flash message to be retained. I can only think of populating the message in the session.Any new ideas? help needed

+1  A: 

which plugins? If the redirects are happening in controllers, you might be able to grab the flash message and reapply it for the next request. If the redirects are happening in plugin controllers, you can extend those controllers, configure your controller to be injected instead of the original (in resources.groovy), and handle propagating the flash message there.

If not, you can putting it in your session might be the easiest thing to do. Just make sure you test removing it from the session in the final controller action that renders the final view in the chain.

hvgotcodes