roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1089291 - /roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIActionPrepareInterceptor.java
Date Wed, 06 Apr 2011 02:22:02 GMT
Author: snoopdave
Date: Wed Apr  6 02:22:02 2011
New Revision: 1089291

URL: http://svn.apache.org/viewvc?rev=1089291&view=rev
Log:
Fix for https://issues.apache.org/jira/browse/ROL-1921

Kludgey fix to allow bean to be passed along the action chain.

Modified:
    roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIActionPrepareInterceptor.java

Modified: roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIActionPrepareInterceptor.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIActionPrepareInterceptor.java?rev=1089291&r1=1089290&r2=1089291&view=diff
==============================================================================
--- roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIActionPrepareInterceptor.java
(original)
+++ roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/util/UIActionPrepareInterceptor.java
Wed Apr  6 02:22:02 2011
@@ -24,6 +24,7 @@ import com.opensymphony.xwork2.intercept
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.ui.struts2.editor.EntryAdd;
+import org.apache.roller.weblogger.ui.struts2.editor.EntryAddWithMediaFile;
 import org.apache.roller.weblogger.ui.struts2.editor.EntryEdit;
 
 
@@ -56,6 +57,10 @@ public class UIActionPrepareInterceptor 
                     EntryEdit editAction = (EntryEdit)action0;
                     EntryAdd addAction = (EntryAdd)action1;
                     editAction.getBean().setId(addAction.getBean().getId());
+                } else if (action0 instanceof EntryAdd && action1 instanceof EntryAddWithMediaFile)
{
+                    EntryAdd addAction = (EntryAdd)action0;
+                	EntryAddWithMediaFile mediaAction = (EntryAddWithMediaFile)action1;
+                	addAction.setBean(mediaAction.getBean());
                 }
             }            
             



Mime
View raw message