Make flash to work correctly even without redirection

Bug #485825 reported by David Marko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Unassigned
1.1
Fix Committed
Undecided
Unassigned

Bug Description

I have the following scenario for using 'flash' object. In controller
I have 'on post' action, that ends with?

---
flash.put("message", "Document contains some errors.");
render("Browse/index.html", folder, form);
---

The flash message shows correctly, but when I click on other link on
such page, the message is displayed once again. There is no such
behaviour, when I use some rediction instead of 'render("Browse/
index.html", folder, form);' . I know that flash is commonly used to
bridge the gap between requests with redirection, but I think it
should work correctly even for such simple case as I have ... or am I
doing something wrong?
#############################
Guillaume Bort:
Well it miss a flash.now() method, like in Rails:
now():
Sets a flash that will not be available to the next action, only to the current.
Can you post a bug report ? I will start to implement it.

Details here:
http://groups.google.com/group/play-framework/browse_thread/thread/ee99d72e6757d75e

Revision history for this message
Guillaume Bort (guillaume-bort) wrote :

So use flash.now(...)

Changed in play:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.