continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r563495 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/admin/ProfileAction.java resources/xwork.xml webapp/WEB-INF/jsp/admin/editProfile.jsp
Date Tue, 07 Aug 2007 13:22:03 GMT
Author: evenisse
Date: Tue Aug  7 06:22:01 2007
New Revision: 563495

URL: http://svn.apache.org/viewvc?view=rev&rev=563495
Log:
[CONTINUUM-1361] Make profile screens less confusing
Submitted by: Olivier Lamy

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java?view=diff&rev=563495&r1=563494&r2=563495
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java
Tue Aug  7 06:22:01 2007
@@ -69,7 +69,7 @@
      */
     private InstallationService installationService;
 
-    private List profiles;
+    private List<Profile> profiles;
 
     private Profile profile;
 
@@ -114,11 +114,18 @@
         Profile stored = profileService.getProfile( profile.getId() );
         if ( stored == null )
         {
-            profileService.addProfile( profile );
+            this.profile = profileService.addProfile( profile );
+            this.allInstallations = installationService.getAllInstallations();
+            return "editProfile";
         }
         else
         {
-            //profileToStore.setName( profile.getName() );
+            // olamy : the only this to change here is the profile
+            // but in the UI maybe some installations has been we retrieve it
+            // and only set the name
+            String name = profile.getName();
+            profile = profileService.getProfile( profile.getId() );
+            profile.setName( name );
             profileService.updateProfile( profile );
         }
         this.profiles = profileService.getAllProfiles();

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=563495&r1=563494&r2=563495
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Tue Aug  7 06:22:01
2007
@@ -171,8 +171,8 @@
       <result name="success" type="chain">groupSummary</result>
       <result name="projectGroupSummary" type="redirect-action">
         <param name="actionName">projectGroupSummary</param>
-        <param name="projectGroupId">${projectGroupId}</param>		  
-	  </result>
+        <param name="projectGroupId">${projectGroupId}</param>
+      </result>
     </action>
 
     <action name="addMavenOneProject" class="addMavenOneProject">
@@ -189,8 +189,8 @@
       <result name="success" type="chain">groupSummary</result>
       <result name="projectGroupSummary" type="redirect-action">
         <param name="actionName">projectGroupSummary</param>
-        <param name="projectGroupId">${projectGroupId}</param>        
-      </result>		
+        <param name="projectGroupId">${projectGroupId}</param>
+      </result>        
     </action>
 
     <action name="deleteProject" class="deleteProject">
@@ -479,7 +479,7 @@
     <action name="configureAppearance" class="configureAppearance" method="input">
       <result name="input">/WEB-INF/jsp/admin/appearance.jsp</result>
     </action>
-	  
+      
     <action name="editAppearance" class="configureAppearance" method="input">
       <result name="input">/WEB-INF/jsp/admin/editAppearance.jsp</result>
     </action>
@@ -529,6 +529,7 @@
     <action name="saveProfile" class="profileAdministration" method="save">
       <result name="success">/WEB-INF/jsp/admin/profilesList.jsp</result>
       <result name="input">/WEB-INF/jsp/admin/editProfile.jsp</result>
+      <result name="editProfile">/WEB-INF/jsp/admin/editProfile.jsp</result>
     </action>
       
     <action name="addInstallationProfile" class="profileAdministration" method="addInstallation">

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp?view=diff&rev=563495&r1=563494&r2=563495
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp
Tue Aug  7 06:22:01 2007
@@ -49,7 +49,7 @@
           <ww:form action="saveProfile!save" method="post">
 
             <div class="axial">
-    
+              <!--  if other fields are added ProfileAction#save must be changed  -->
               <table>
                 <tbody>
                   <ww:hidden name="profile.id" />



Mime
View raw message