开发者

flash message grails

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开发者_如何学C. I can only think of populating the message in the session.Any new ideas? help needed


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.


One-Time Data plugin is what you need

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜