continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r358766 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ProjectEditAction.java resources/localization/Continuum.properties webapp/projectEdit.jsp
Date Fri, 23 Dec 2005 08:17:28 GMT
Author: evenisse
Date: Fri Dec 23 00:17:20 2005
New Revision: 358766

URL: http://svn.apache.org/viewcvs?rev=358766&view=rev
Log:
Fix project edition

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectEditAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectEditAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectEditAction.java?rev=358766&r1=358765&r2=358766&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectEditAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectEditAction.java
Fri Dec 23 00:17:20 2005
@@ -50,25 +50,34 @@
 
     public String execute()
     {
-        Project p = new Project();
+        try
+        {
+            project = getProject( projectId );
+        }
+        catch ( ContinuumException e )
+        {
+            addActionMessage( "Can't get project informations (id=" + projectId + ") : "
+ e.getMessage() );
+
+            e.printStackTrace();
 
-        p.setId( projectId );
+            return ERROR;
+        }
 
-        p.setName( name );
+        project.setName( name );
 
-        p.setVersion( version );
+        project.setVersion( version );
 
-        p.setScmUrl( scmUrl );
+        project.setScmUrl( scmUrl );
 
-        p.setScmUsername( scmUsername );
+        project.setScmUsername( scmUsername );
 
-        p.setScmPassword( scmPassword );
+        project.setScmPassword( scmPassword );
 
-        p.setScmTag( scmTag );
+        project.setScmTag( scmTag );
 
         try
         {
-            continuum.updateProject( p );
+            continuum.updateProject( project );
         }
         catch ( ContinuumException e )
         {
@@ -97,6 +106,18 @@
             return ERROR;
         }
 
+        name = project.getName();
+
+        version = project.getVersion();
+
+        scmUrl = project.getScmUrl();
+
+        scmUsername = project.getScmUsername();
+
+        scmPassword = project.getScmPassword();
+
+        scmTag = project.getScmTag();
+
         return INPUT;
     }
 
@@ -116,29 +137,59 @@
         this.projectId = projectId;
     }
 
-    public void setProjectName( String name )
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName( String name )
     {
         this.name = name;
     }
 
+    public String getVersion()
+    {
+        return version;
+    }
+
     public void setVersion( String version )
     {
         this.version = version;
     }
 
+    public String getScmUrl()
+    {
+        return scmUrl;
+    }
+
     public void setScmUrl( String scmUrl )
     {
         this.scmUrl = scmUrl;
     }
 
+    public String getScmUsername()
+    {
+        return scmUsername;
+    }
+
     public void setScmUsername( String scmUsername )
     {
         this.scmUsername = scmUsername;
     }
 
-    public void setPassword( String scmPassword )
+    public String getScmPassword()
+    {
+        return scmPassword;
+    }
+
+    public void setScmPassword( String scmPassword )
     {
         this.scmPassword = scmPassword;
+    }
+
+    public String getScmTag()
+    {
+        return scmTag;
     }
 
     public void setScmTag( String scmTag )

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=358766&r1=358765&r2=358766&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Fri Dec 23 00:17:20 2005
@@ -11,6 +11,7 @@
 edit = Edit
 delete = Delete
 save = Save
+add = Add
 
 // ----------------------------------------------------------------------
 // Page: Top

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp?rev=358766&r1=358765&r2=358766&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp Fri Dec 23 00:17:20
2005
@@ -11,12 +11,12 @@
         <div class="axial">
           <ww:form action="projectEdit.action" method="post">
             <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
-            <ww:textfield label="%{getText('projectEdit.project.name.label')}" name="project.name"/>
-            <ww:textfield label="%{getText('projectEdit.project.version.label')}" name="project.version"/>
-            <ww:textfield label="%{getText('projectEdit.project.scmUrl.label')}" name="project.scmUrl"/>
-            <ww:textfield label="%{getText('projectEdit.project.scmUsername.label')}"
name="project.scmUsername"/>
-            <ww:password label="%{getText('projectEdit.project.scmPassword.label')}" name="project.scmPassword"/>
-            <ww:textfield label="%{getText('projectEdit.project.scmTag.label')}" name="project.scmTag"/>
+            <ww:textfield label="%{getText('projectEdit.project.name.label')}" name="name"/>
+            <ww:textfield label="%{getText('projectEdit.project.version.label')}" name="version"/>
+            <ww:textfield label="%{getText('projectEdit.project.scmUrl.label')}" name="scmUrl"/>
+            <ww:textfield label="%{getText('projectEdit.project.scmUsername.label')}"
name="scmUsername"/>
+            <ww:password label="%{getText('projectEdit.project.scmPassword.label')}" name="scmPassword"/>
+            <ww:textfield label="%{getText('projectEdit.project.scmTag.label')}" name="scmTag"/>
             <ww:submit value="%{getText('save')}"/>
           </ww:form>
         </div>



Mime
View raw message