Revision: 1401
http://stripes.svn.sourceforge.net/stripes/?rev=1401&view=rev
Author: bengunter
Date: 2011-03-03 16:46:08 +0000 (Thu, 03 Mar 2011)
Log Message:
-----------
Applied fix for STS-812 from 1.5.x branch.
Modified Paths:
--------------
trunk/stripes/src/net/sourceforge/stripes/action/ActionBeanContext.java
Modified:
trunk/stripes/src/net/sourceforge/stripes/action/ActionBeanContext.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/action/ActionBeanContext.java
2011-03-03 16:40:54 UTC (rev 1400)
+++ trunk/stripes/src/net/sourceforge/stripes/action/ActionBeanContext.java
2011-03-03 16:46:08 UTC (rev 1401)
@@ -186,6 +186,23 @@
if (messages == null) {
messages = new ArrayList<Message>();
+
+ /*
+ * Messages imported from previous flash scope will be present in
request scope but not
+ * in current flash scope. Handle such cases by copying the
existing messages to a new
+ * list in the current flash and request scopes.
+ */
+ if (getRequest().getAttribute(key) instanceof List) {
+ try {
+ for (Message message : ((List<Message>)
getRequest().getAttribute(key))) {
+ messages.add(message);
+ }
+ }
+ catch (ClassCastException e) {
+ messages.clear();
+ }
+ }
+
scope.put(key, messages);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development