continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r563436 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java java/org/apache/maven/continuum/web/action/AddProjectAction.java resources/xwork.xml
Date Tue, 07 Aug 2007 09:57:05 GMT
Author: evenisse
Date: Tue Aug  7 02:57:05 2007
New Revision: 563436

URL: http://svn.apache.org/viewvc?view=rev&rev=563436
Log:
[CONTINUUM-1305] Return to the group page after adding a project from this page
Submitted by: Olivier Lamy

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java?view=diff&rev=563436&r1=563435&r2=563436
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
Tue Aug  7 02:57:05 2007
@@ -64,6 +64,8 @@
     private boolean disableGroupSelection;
 
     private boolean scmUseCache;
+    
+    private int projectGroupId;
 
     public String execute()
         throws ContinuumException
@@ -155,7 +157,13 @@
 
             return doDefault();
         }
-
+        
+        if ( this.getSelectedProjectGroup() > 0 )
+        {
+            this.setProjectGroupId( this.getSelectedProjectGroup() );
+            return "projectGroupSummary";
+        }
+        
         return SUCCESS;
     }
 
@@ -324,5 +332,15 @@
     public void setScmUseCache( boolean scmUseCache )
     {
         this.scmUseCache = scmUseCache;
+    }
+
+    public int getProjectGroupId()
+    {
+        return projectGroupId;
+    }
+
+    public void setProjectGroupId( int projectGroupId )
+    {
+        this.projectGroupId = projectGroupId;
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?view=diff&rev=563436&r1=563435&r2=563436
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Tue Aug  7 02:57:05 2007
@@ -75,6 +75,8 @@
      * @plexus.requirement role-hint="default"
      */
     private ProfileService profileService;
+    
+    private int projectGroupId;
 
     public void validate()
     {
@@ -145,6 +147,12 @@
 
         getContinuum().addProject( project, projectType, selectedProjectGroup );
 
+        if ( this.getSelectedProjectGroup() > 0 )
+        {
+            this.setProjectGroupId( this.getSelectedProjectGroup() );
+            return "projectGroupSummary";
+        }        
+        
         return SUCCESS;
     }
 
@@ -317,5 +325,15 @@
     public void setProfiles( List<Profile> profiles )
     {
         this.profiles = profiles;
+    }
+
+    public int getProjectGroupId()
+    {
+        return projectGroupId;
+    }
+
+    public void setProjectGroupId( int projectGroupId )
+    {
+        this.projectGroupId = projectGroupId;
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=563436&r1=563435&r2=563436
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Tue Aug  7 02:57:05
2007
@@ -169,6 +169,10 @@
     <action name="addMavenTwoProject" class="addMavenTwoProject">
       <result name="input">/WEB-INF/jsp/addMavenTwoProject.jsp</result>
       <result name="success" type="chain">groupSummary</result>
+      <result name="projectGroupSummary" type="redirect-action">
+        <param name="actionName">projectGroupSummary</param>
+        <param name="projectGroupId">${projectGroupId}</param>		  
+	  </result>
     </action>
 
     <action name="addMavenOneProject" class="addMavenOneProject">
@@ -183,6 +187,10 @@
     <action name="addProject" class="addProject" method="add">
       <result name="input">/WEB-INF/jsp/addProject.jsp</result>
       <result name="success" type="chain">groupSummary</result>
+      <result name="projectGroupSummary" type="redirect-action">
+        <param name="actionName">projectGroupSummary</param>
+        <param name="projectGroupId">${projectGroupId}</param>        
+      </result>		
     </action>
 
     <action name="deleteProject" class="deleteProject">



Mime
View raw message