You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ev...@apache.org on 2007/02/06 12:11:41 UTC

svn commit: r504075 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/notifier/ resources/ webapp/WEB-INF/jsp/components/ webapp/WEB-INF/jsp/notifier/

Author: evenisse
Date: Tue Feb  6 03:11:35 2007
New Revision: 504075

URL: http://svn.apache.org/viewvc?view=rev&rev=504075
Log:
[CONTINUUM-1154] Return to the group notifiers list if the notifier is edited from this list
Submitted by: Teodoro Cue Jr.

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AddProjectNotifierAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AbstractNotifierEditActionSupport.java Tue Feb  6 03:11:35 2007
@@ -72,6 +72,12 @@
      * for the build.
      */
     private boolean sendOnWarning;
+    
+    /**
+     * Detemines if the save operation returns to the project group notifier page or not.<p>
+     * <code>true</code> implies return to the project group notifier page.
+     */
+    private boolean fromGroupPage = false;
 
     /**
      * Obtain and return the {@link ProjectNotifier} instance for editing.
@@ -124,6 +130,11 @@
 
         saveNotifier( notifier );
 
+        if ( fromGroupPage )
+        {
+            return "to_group_page";
+        }
+
         return SUCCESS;
     }
 
@@ -250,6 +261,22 @@
     public void setNotifierId( int notifierId )
     {
         this.notifierId = notifierId;
+    }
+
+    /**
+     * @return the fromGroupPage
+     */
+    public boolean isFromGroupPage()
+    {
+        return fromGroupPage;
+    }
+
+    /**
+     * @param fromGroupPage the fromGroupPage to set
+     */
+    public void setFromGroupPage( boolean fromGroupPage )
+    {
+        this.fromGroupPage = fromGroupPage;
     }
 
     /**

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AddProjectNotifierAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AddProjectNotifierAction.java?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AddProjectNotifierAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/AddProjectNotifierAction.java Tue Feb  6 03:11:35 2007
@@ -49,6 +49,12 @@
      * Type for a {@link ProjectNotifier}.
      */
     private String notifierType;
+    
+    /**
+     * Detemines if the save operation returns to the project group notifier page or not.<p>
+     * <code>true</code> implies return to the project group notifier page.
+     */
+    private boolean fromGroupPage = false;
 
     /**
      * Default method executed when no specific method is specified
@@ -132,4 +138,19 @@
         this.projectGroupId = projectGroupId;
     }
 
+    /**
+     * @return the fromGroupPage
+     */
+    public boolean isFromGroupPage()
+    {
+        return fromGroupPage;
+    }
+
+    /**
+     * @param fromGroupPage the fromGroupPage to set
+     */
+    public void setFromGroupPage( boolean fromGroupPage )
+    {
+        this.fromGroupPage = fromGroupPage;
+    }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/notifier/DeleteProjectNotifierAction.java Tue Feb  6 03:11:35 2007
@@ -51,10 +51,18 @@
 
     private String recipient;
 
+    private boolean fromGroupPage = false;
+
     public String execute()
         throws ContinuumException
     {
         getContinuum().removeNotifier( projectId, notifierId );
+
+        if ( fromGroupPage )
+        {
+            return "to_group_page";
+        }
+
         return SUCCESS;
     }
 
@@ -136,6 +144,16 @@
     public void setRecipient( String recipient )
     {
         this.recipient = recipient;
+    }
+
+    public boolean isFromGroupPage()
+    {
+        return fromGroupPage;
+    }
+
+    public void setFromGroupPage( boolean fromGroupPage )
+    {
+        this.fromGroupPage = fromGroupPage;
     }
 
 }

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=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Tue Feb  6 03:11:35 2007
@@ -513,6 +513,7 @@
     <action name="deleteProjectNotifier" class="deleteProjectNotifier">
       <result name="delete">/WEB-INF/jsp/notifier/deleteNotifier.jsp</result>
       <result name="success" type="chain">projectView</result>
+      <result name="to_group_page" type="chain">projectGroupNotifier</result>
     </action>
 
     <action name="addProjectNotifier" class="addProjectNotifier" method="doDefault">
@@ -529,7 +530,7 @@
       <result name="irc_input" type="chain">ircProjectNotifierEdit</result>
       <result name="msn_input" type="chain">msnProjectNotifierEdit</result>
       <result name="jabber_input" type="chain">jabberProjectNotifierEdit</result>
-      <result name="wagon_input" type="chain">WagonProjectNotifierEdit</result>
+      <result name="wagon_input" type="chain">wagonProjectNotifierEdit</result>
     </action>
 
     <action name="mailProjectNotifierEdit" class="mailProjectNotifierEdit" method="edit">
@@ -539,6 +540,7 @@
     <action name="mailProjectNotifierSave" class="mailProjectNotifierEdit" method="save">
       <result name="input">/WEB-INF/jsp/notifier/notifierMail.jsp</result>
       <result name="success" type="chain">projectView</result>
+      <result name="to_group_page" type="chain">projectGroupNotifier</result>
     </action>
 
     <action name="ircProjectNotifierEdit" class="ircProjectNotifierEdit" method="edit">
@@ -548,6 +550,7 @@
     <action name="ircProjectNotifierSave" class="ircProjectNotifierEdit" method="save">
       <result name="input">/WEB-INF/jsp/notifier/notifierIrc.jsp</result>
       <result name="success" type="chain">projectView</result>
+      <result name="to_group_page" type="chain">projectGroupNotifier</result>
     </action>
 
     <action name="jabberProjectNotifierEdit" class="jabberProjectNotifierEdit" method="edit">
@@ -557,6 +560,7 @@
     <action name="jabberProjectNotifierSave" class="jabberProjectNotifierEdit" method="save">
       <result name="input">/WEB-INF/jsp/notifier/notifierJabber.jsp</result>
       <result name="success" type="chain">projectView</result>
+      <result name="to_group_page" type="chain">projectGroupNotifier</result>
     </action>
 
     <action name="msnProjectNotifierEdit" class="msnProjectNotifierEdit" method="edit">
@@ -566,6 +570,7 @@
     <action name="msnProjectNotifierSave" class="msnProjectNotifierEdit" method="save">
       <result name="input">/WEB-INF/jsp/notifier/notifierMsn.jsp</result>
       <result name="success" type="chain">projectView</result>
+      <result name="to_group_page" type="chain">projectGroupNotifier</result>
     </action>
 
     <action name="wagonProjectNotifierEdit" class="wagonProjectNotifierEdit" method="edit">
@@ -575,6 +580,7 @@
     <action name="wagonProjectNotifierSave" class="wagonProjectNotifierEdit" method="save">
       <result name="input">/WEB-INF/jsp/notifier/notifierWagon.jsp</result>
       <result name="success" type="chain">projectView</result>
+      <result name="to_group_page" type="chain">projectGroupNotifier</result>
     </action>
 
     <!--

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupNotifierSummaryComponent.jsp Tue Feb  6 03:11:35 2007
@@ -111,6 +111,7 @@
                 <ww:param name="projectId">${pageScope.projectNotifierSummary.projectId}</ww:param>
                 <ww:param name="notifierId">${pageScope.projectNotifierSummary.id}</ww:param>
                 <ww:param name="notifierType">${pageScope.projectNotifierSummary.type}</ww:param>
+                <ww:param name="fromGroupPage" value="true"/>
               </ww:url>
               <ww:a href="%{editUrl}">
                 <img src="<ww:url value='/images/edit.gif'/>" alt="Edit" title="Edit" border="0">
@@ -129,6 +130,7 @@
                 <ww:param name="projectId">${pageScope.projectNotifierSummary.projectId}</ww:param>
                 <ww:param name="notifierId">${pageScope.projectNotifierSummary.id}</ww:param>
                 <ww:param name="confirmed" value="false"/>
+                <ww:param name="fromGroupPage" value="true"/>
               </ww:url>
               <ww:a href="%{removeUrl}">
                 <img src="<ww:url value='/images/delete.gif'/>" alt="Delete" title="Delete" border="0">

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierIrc.jsp Tue Feb  6 03:11:35 2007
@@ -48,6 +48,7 @@
             <ww:hidden name="projectId"/>
             <ww:hidden name="projectGroupId"/>
             <ww:hidden name="notifierType"/>            
+            <ww:hidden name="fromGroupPage"/>
             <table>
               <tbody>
                 <ww:textfield label="%{getText('notifier.irc.host.label')}" name="host" required="true"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierJabber.jsp Tue Feb  6 03:11:35 2007
@@ -48,6 +48,7 @@
             <ww:hidden name="projectId"/>
             <ww:hidden name="projectGroupId"/>
             <ww:hidden name="notifierType"/>
+            <ww:hidden name="fromGroupPage"/>
             <table>
               <tbody>
                 <ww:textfield label="%{getText('notifier.jabber.host.label')}" name="host" required="true"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMail.jsp Tue Feb  6 03:11:35 2007
@@ -49,6 +49,7 @@
             <ww:hidden name="projectId"/>
             <ww:hidden name="projectGroupId"/>
             <ww:hidden name="notifierType"/>
+            <ww:hidden name="fromGroupPage"/>
             <table>
               <tbody>
                 <ww:textfield label="%{getText('notifier.mail.recipient.label')}" name="address" required="true" />

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierMsn.jsp Tue Feb  6 03:11:35 2007
@@ -48,6 +48,7 @@
             <ww:hidden name="projectId"/>
             <ww:hidden name="projectGroupId"/>
             <ww:hidden name="notifierType"/>
+            <ww:hidden name="fromGroupPage"/>
             <table>
               <tbody>
                 <ww:textfield label="%{getText('notifier.msn.login.label')}" name="login" required="true"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp?view=diff&rev=504075&r1=504074&r2=504075
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/notifier/notifierWagon.jsp Tue Feb  6 03:11:35 2007
@@ -49,6 +49,7 @@
             <ww:hidden name="projectId"/>
             <ww:hidden name="projectGroupId"/>
             <ww:hidden name="notifierType"/>
+            <ww:hidden name="fromGroupPage"/>
 
             <table>
               <tbody>