mirror of https://github.com/apache/archiva.git
[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 git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@661582 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
86628294c8
commit
b4f9994165
|
@ -286,6 +286,25 @@ public class UploadAction
|
|||
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 @@ public class UploadAction
|
|||
|
||||
//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 )
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue