archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r661582 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main: java/org/apache/maven/archiva/web/action/UploadAction.java resources/xwork.xml
Date Fri, 30 May 2008 07:43:23 GMT
Author: oching
Date: Fri May 30 00:43:23 2008
New Revision: 661582

URL: http://svn.apache.org/viewvc?rev=661582&view=rev
Log:
[MRM-785]
-set success result to go to jsp file instead of redirect to 'upload' action
-clear the form fields before returning to jsp page after upload

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java?rev=661582&r1=661581&r2=661582&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
Fri May 30 00:43:23 2008
@@ -286,6 +286,25 @@
         return INPUT;
     }
 
+    private void reset()
+    {
+        // reset the fields so the form is clear when 
+        // the action returns to the jsp page
+        groupId = "";
+        artifactId = "";
+        version = "";
+        packaging = "";
+        classifier = "";
+        artifactFile = null;
+        artifactContentType = "";
+        artifactFilename = "";
+        pomFile = null;
+        pomContentType = "";
+        pomFilename = "";
+        repositoryId = "";
+        generatePom = false;
+    }
+    
     public String doUpload()
     {
         try
@@ -367,10 +386,10 @@
 
             //TODO: MRM-810 (this writes to archiva.log, should be audit.log)
             getLogger().info( msg + " by " + getPrincipal() );
-
-            //TODO: MRM-785 (success message does not display on web page)
+            
             addActionMessage( msg );
 
+            reset();
             return SUCCESS;
         }
         catch ( RepositoryNotFoundException re )

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml?rev=661582&r1=661581&r2=661582&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml
Fri May 30 00:43:23 2008
@@ -157,7 +157,7 @@
 	<action name="upload" class="uploadAction" method="input">      
       <result name="input">/WEB-INF/jsp/upload.jsp</result>
       <result name="error">/WEB-INF/jsp/upload.jsp</result>
-      <result name="success" type="redirect-action">upload</result>
+      <result name="success">/WEB-INF/jsp/upload.jsp</result>
       <interceptor-ref name="configuredPrepareParamsStack"/>
       <interceptor-ref name="fileUpload"/>
     </action>



Mime
View raw message