continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r438625 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ScheduleAction.java resources/xwork.xml webapp/confirmScheduleRemoval.jsp
Date Wed, 30 Aug 2006 21:12:23 GMT
Author: jmcconnell
Date: Wed Aug 30 14:12:23 2006
New Revision: 438625

URL: http://svn.apache.org/viewvc?rev=438625&view=rev
Log:
added confirm step to schedule removal

Added:
    maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmScheduleRemoval.jsp   (with
props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.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/ScheduleAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java?rev=438625&r1=438624&r2=438625&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
Wed Aug 30 14:12:23 2006
@@ -45,6 +45,8 @@
 
     private Schedule schedule;
 
+    private boolean confirmed;
+
     public String summary()
         throws ContinuumException
     {
@@ -123,12 +125,27 @@
         }
     }
 
+    public String confirm()
+        throws ContinuumException
+    {
+        schedule = getContinuum().getSchedule( id );
+
+        return SUCCESS;
+    }
+
     public String remove()
         throws ContinuumException
     {
-       getContinuum().removeSchedule( id );
+        if ( confirmed )
+        {
+            getContinuum().removeSchedule( id );
+        }
+        else
+        {
+            return CONFIRM;
+        }
 
-       return SUCCESS; 
+        return SUCCESS;
     }
 
     public Collection getSchedules()
@@ -204,5 +221,15 @@
     public void setSchedule( Schedule schedule )
     {
         this.schedule = schedule;
+    }
+
+    public boolean isConfirmed()
+    {
+        return confirmed;
+    }
+
+    public void setConfirmed( boolean confirmed )
+    {
+        this.confirmed = confirmed;
     }
 }

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?rev=438625&r1=438624&r2=438625&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Wed Aug 30 14:12:23
2006
@@ -298,9 +298,13 @@
     </action>
 
     <action name="removeSchedule" class="schedule" method="remove">
+      <result name="confirm" type="chain">confirmScheduleRemoval</result>
       <result name="success" type="chain">schedules</result>
     </action>
 
+    <action name="confirmScheduleRemoval" class="schedule" method="confirm">
+      <result name="success">confirmScheduleRemoval.jsp</result>
+    </action>
 
   </package>
 

Added: maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmScheduleRemoval.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmScheduleRemoval.jsp?rev=438625&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmScheduleRemoval.jsp (added)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmScheduleRemoval.jsp Wed
Aug 30 14:12:23 2006
@@ -0,0 +1,29 @@
+<%@ taglib uri="/webwork" prefix="ww" %>
+<%@ taglib uri="continuum" prefix="c1" %>
+<html>
+  <ww:i18n name="localization.Continuum">
+    <head>
+        <title>Schedule Removal</title>
+    </head>
+    <body>
+      <div id="axial" class="h3">
+        <h3>Schedule Removal</h3>
+        <div class="axial">
+        <ww:form action="removeSchedule" method="post">
+          <ww:hidden name="id"/>
+          <ww:hidden name="confirmed" value="true"/>
+          <ww:actionerror/>
+
+          <p>
+            Are you sure you wish to remove <ww:property value="schedule.name"/>?
+          </p>
+
+          <div class="functnbar3">
+            <c1:submitcancel value="%{getText('delete')}" cancel="%{getText('cancel')}"/>
+          </div>
+        </ww:form>
+        </div>
+      </div>
+    </body>
+  </ww:i18n>
+</html>

Propchange: maven/continuum/trunk/continuum-webapp/src/main/webapp/confirmScheduleRemoval.jsp
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message