continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r446938 - /maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Date Sat, 16 Sep 2006 20:16:43 GMT
Author: carlos
Date: Sat Sep 16 13:16:43 2006
New Revision: 446938

URL: http://svn.apache.org/viewvc?view=rev&rev=446938
Log:
[CONTINUUM-910] Schedule page needs validation

Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java?view=diff&rev=446938&r1=446937&r2=446938
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Sat Sep 16 13:16:43 2006
@@ -99,15 +99,22 @@
     public String save()
         throws ContinuumException
     {
-        if ( id == 0 )
+        if ( ( "".equals( name ) ) || ( name == null ) ) 
         {
-            getContinuum().addSchedule( setFields( new Schedule() ) );
-            return SUCCESS;
+            return ERROR;
         }
         else
         {
-            getContinuum().updateSchedule( setFields( getContinuum().getSchedule( id ) )
);
-            return SUCCESS;
+            if ( id == 0 )
+            {
+                getContinuum().addSchedule( setFields( new Schedule() ) );
+                return SUCCESS;
+            }
+            else
+            {
+                getContinuum().updateSchedule( setFields( getContinuum().getSchedule( id
) ) );
+                return SUCCESS;
+            }   
         }
     }
 



Mime
View raw message