continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r447350 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ resources/org/apache/maven/continuum/web/action/ webapp/
Date Mon, 18 Sep 2006 10:17:32 GMT
Author: carlos
Date: Mon Sep 18 03:17:31 2006
New Revision: 447350

URL: http://svn.apache.org/viewvc?view=rev&rev=447350
Log:
[CONTINUUM-920] Project edit function for Ant projects doesn't have validation.
Submitted By: Maria Odea Ching 

Added:
    maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ProjectEditAction-projectSave-validation.xml
  (with props)
Removed:
    maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ProjectEditAction-validation.xml
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/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectEditAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectEditAction.java?view=diff&rev=447350&r1=447349&r2=447350
==============================================================================
--- 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
Mon Sep 18 03:17:31 2006
@@ -47,7 +47,7 @@
 
     private String scmTag;
 
-    public String execute()
+    public String save()
         throws ContinuumException
     {
         project = getProject( projectId );
@@ -69,7 +69,7 @@
         return SUCCESS;
     }
 
-    public String doEdit()
+    public String edit()
         throws ContinuumException
     {
         project = getProject( projectId );
@@ -86,7 +86,7 @@
 
         scmTag = project.getScmTag();
 
-        return INPUT;
+        return SUCCESS;
     }
 
     private Project getProject( int projectId )

Added: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ProjectEditAction-projectSave-validation.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ProjectEditAction-projectSave-validation.xml?view=auto&rev=447350
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ProjectEditAction-projectSave-validation.xml
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ProjectEditAction-projectSave-validation.xml
Mon Sep 18 03:17:31 2006
@@ -0,0 +1,21 @@
+<!DOCTYPE validators PUBLIC
+    "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+    "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+
+<validators>
+  <field name="name">
+    <field-validator type="required">
+      <message key="projectEdit.name.required"/>
+    </field-validator>
+  </field>
+  <field name="version">
+    <field-validator type="required">
+      <message key="projectEdit.version.required"/>
+    </field-validator>
+  </field>
+  <field name="scmUrl">
+    <field-validator type="required">
+      <message key="projectEdit.scmUrl.required"/>
+    </field-validator>
+  </field>
+</validators>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ProjectEditAction-projectSave-validation.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ProjectEditAction-projectSave-validation.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

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=447350&r1=447349&r2=447350
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Mon Sep 18 03:17:31
2006
@@ -90,14 +90,13 @@
       <result name="success">projectView.jsp</result>
     </action>
 
-    <action name="projectEdit" class="projectEdit">
-      <result name="input">projectEdit.jsp</result>
-      <result name="success" type="chain">projectView</result>
+    <action name="projectEdit" class="projectEdit" method="edit">
+      <result name="success">projectEdit.jsp</result>
     </action>
 
-    <action name="projectSave" class="projectEdit">
-      <result name="input">projectEdit.jsp</result>
+    <action name="projectSave" class="projectEdit" method="save">
       <result name="success" type="chain">projectView</result>
+      <result name="input">projectEdit.jsp</result>
     </action>
 
     <!--

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp?view=diff&rev=447350&r1=447349&r2=447350
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectEdit.jsp Mon Sep 18 03:17:31
2006
@@ -10,7 +10,7 @@
         <h3><ww:text name="projectEdit.section.title"/></h3>
 
         <div class="axial">
-          <ww:form action="projectSave.action" method="post">
+          <ww:form action="projectSave" method="post" validate="true">
             <table>
               <tbody>
                 <ww:hidden name="projectId"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp?view=diff&rev=447350&r1=447349&r2=447350
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp Mon Sep 18 03:17:31
2006
@@ -34,7 +34,7 @@
               <tbody>
               <tr>
                 <td>
-                  <form action="projectEdit!edit.action" method="post">
+                  <form action="projectEdit.action" method="post">
                     <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
                     <input type="submit" name="edit-project" value="<ww:text name="edit"/>"/>
                   </form>



Mime
View raw message