continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r447833 - 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 Tue, 19 Sep 2006 12:42:05 GMT
Author: evenisse
Date: Tue Sep 19 05:42:04 2006
New Revision: 447833

URL: http://svn.apache.org/viewvc?view=rev&rev=447833
Log:
[CONTINUUM-921] Fix notifiers validation
Submitted by: Maria Odea Ching

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractNotifierEditAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/IrcNotifierEditAction-ircNotifierSave-validation.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/JabberNotifierEditAction-jabberNotifierSave-validation.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MailNotifierEditAction-mailNotifierSave-validation.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MsnNotifierEditAction-msnNotifierSave-validation.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierIrc.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierJabber.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMail.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMsn.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierSelectType.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/AbstractNotifierEditAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractNotifierEditAction.java?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractNotifierEditAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractNotifierEditAction.java
Tue Sep 19 05:42:04 2006
@@ -44,7 +44,7 @@
 
     private boolean sendOnWarning;
 
-    public String execute()
+    public String save()
         throws ContinuumException
     {
         boolean isNew = false;
@@ -82,7 +82,7 @@
         return SUCCESS;
     }
 
-    public String doDefault()
+    public String edit()
         throws ContinuumException
     {
         notifier = getNotifier();
@@ -104,7 +104,7 @@
 
         initConfiguration( notifier.getConfiguration() );
 
-        return INPUT;
+        return SUCCESS;
     }
 
     protected abstract void initConfiguration( Map configuration );

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/IrcNotifierEditAction-ircNotifierSave-validation.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/IrcNotifierEditAction-ircNotifierSave-validation.xml?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/IrcNotifierEditAction-ircNotifierSave-validation.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/IrcNotifierEditAction-ircNotifierSave-validation.xml
Tue Sep 19 05:42:04 2006
@@ -2,22 +2,26 @@
     "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
     "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
 
+<!-- TODO: there was a problem with getting the message values from the properties file
so
+    the error messages were just specified here -->
 <validators>
   <field name="host">
     <field-validator type="required">
-      <message key="ircNotifier.host.required"/>
+      <message>Host is required</message>
+      <!--message key="ircNotifier.host.required"/-->
     </field-validator>
   </field>
   <field name="port">
-    <field-validator type="int">
-      <param name="min">0</param>
-      <param name="max">65535</param>
-      <message key="ircNotifier.port.invalid"/>
+    <field-validator type="regex">
+      <param name="expression"><![CDATA[([0-9])]]></param>
+      <message>Port must be an integer</message>
+      <!--message key="ircNotifier.port.invalid"/-->
     </field-validator>
   </field>
   <field name="channel">
     <field-validator type="required">
-      <message key="ircNotifier.channel.required"/>
+      <message>Channel is required</message>
+      <!--message key="ircNotifier.channel.required"/-->
     </field-validator>
   </field>
 </validators>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/JabberNotifierEditAction-jabberNotifierSave-validation.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/JabberNotifierEditAction-jabberNotifierSave-validation.xml?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/JabberNotifierEditAction-jabberNotifierSave-validation.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/JabberNotifierEditAction-jabberNotifierSave-validation.xml
Tue Sep 19 05:42:04 2006
@@ -2,32 +2,39 @@
     "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
     "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
 
+<!-- TODO: there was a problem with getting the message values from the properties file
so
+    the error messages were just specified here -->
+
 <validators>
   <field name="host">
     <field-validator type="required">
-      <message key="jabberNotifier.host.required"/>
+      <message>Host is required</message>
+      <!--message key="jabberNotifier.host.required"/-->
     </field-validator>
   </field>
   <field name="port">
-    <field-validator type="int">
-      <param name="min">0</param>
-      <param name="max">65535</param>
-      <message key="jabberNotifier.port.invalid"/>
+    <field-validator type="regex">
+      <param name="expression"><![CDATA[([0-9])]]></param>
+      <message>Port must be an integer</message>
+      <!--message key="jabberNotifier.port.invalid"/-->
     </field-validator>
   </field>
   <field name="login">
     <field-validator type="required">
-      <message key="jabberNotifier.login.required"/>
+      <message>Login is required</message>
+      <!--message key="jabberNotifier.login.required"/-->
     </field-validator>
   </field>
   <field name="password">
     <field-validator type="required">
-      <message key="jabberNotifier.password.required"/>
+      <message>Password is required</message>
+      <!--message key="jabberNotifier.password.required"/-->
     </field-validator>
   </field>
   <field name="address">
     <field-validator type="required">
-      <message key="jabberNotifier.address.required"/>
+      <message>Address is required</message>
+      <!--message key="jabberNotifier.address.required"/-->
     </field-validator>
   </field>
 </validators>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MailNotifierEditAction-mailNotifierSave-validation.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MailNotifierEditAction-mailNotifierSave-validation.xml?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MailNotifierEditAction-mailNotifierSave-validation.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MailNotifierEditAction-mailNotifierSave-validation.xml
Tue Sep 19 05:42:04 2006
@@ -2,10 +2,14 @@
     "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
     "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
 
+<!-- TODO: there was a problem with getting the message values from the properties file
so
+    the error messages were just specified here -->
+    
 <validators>
   <field name="address">
     <field-validator type="required">
-      <message key="mailNotifier.address.required"/>
+      <message>Address is required</message>
+      <!--message key="mailNotifier.address.required"/-->
     </field-validator>
   </field>
 </validators>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MsnNotifierEditAction-msnNotifierSave-validation.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MsnNotifierEditAction-msnNotifierSave-validation.xml?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MsnNotifierEditAction-msnNotifierSave-validation.xml
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/MsnNotifierEditAction-msnNotifierSave-validation.xml
Tue Sep 19 05:42:04 2006
@@ -2,20 +2,26 @@
     "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
     "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
 
+<!-- TODO: there was a problem with getting the message values from the properties file
so
+    the error messages were just specified here -->
+    
 <validators>
   <field name="login">
     <field-validator type="required">
-      <message key="jabberNotifier.login.required"/>
+      <message>Login is required</message>
+      <!--message key="jabberNotifier.login.required"/-->
     </field-validator>
   </field>
   <field name="password">
     <field-validator type="required">
-      <message key="jabberNotifier.password.required"/>
+      <message>Password is required</message>
+      <!--message key="jabberNotifier.password.required"/-->
     </field-validator>
   </field>
   <field name="address">
     <field-validator type="required">
-      <message key="jabberNotifier.address.required"/>
+      <message>Address is required</message>
+      <!--message key="jabberNotifier.address.required"/-->
     </field-validator>
   </field>
 </validators>

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=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Tue Sep 19 05:42:04
2006
@@ -223,42 +223,38 @@
       <result name="jabber_input">notifierJabber.jsp</result>
     </action>
 
-    <action name="mailNotifierEdit" class="mailNotifierEdit">
-      <result name="input">notifierMail.jsp</result>
-      <result name="success" type="chain">projectView</result>
+    <action name="mailNotifierEdit" class="mailNotifierEdit" method="edit">
+      <result name="success">notifierMail.jsp</result>
     </action>
 
-    <action name="mailNotifierSave" class="mailNotifierEdit">
+    <action name="mailNotifierSave" class="mailNotifierEdit" method="save">
       <result name="input">notifierMail.jsp</result>
       <result name="success" type="chain">projectView</result>
     </action>
 
-    <action name="ircNotifierEdit" class="ircNotifierEdit">
-      <result name="input">notifierIrc.jsp</result>
-      <result name="success" type="chain">projectView</result>
+    <action name="ircNotifierEdit" class="ircNotifierEdit" method="edit">
+      <result name="success">notifierIrc.jsp</result>
     </action>
 
-    <action name="ircNotifierSave" class="ircNotifierEdit">
+    <action name="ircNotifierSave" class="ircNotifierEdit" method="save">
       <result name="input">notifierIrc.jsp</result>
       <result name="success" type="chain">projectView</result>
     </action>
 
-    <action name="jabberNotifierEdit" class="jabberNotifierEdit">
-      <result name="input">notifierJabber.jsp</result>
-      <result name="success" type="chain">projectView</result>
+    <action name="jabberNotifierEdit" class="jabberNotifierEdit" method="edit">
+      <result name="success">notifierJabber.jsp</result>
     </action>
 
-    <action name="jabberNotifierSave" class="jabberNotifierEdit">
+    <action name="jabberNotifierSave" class="jabberNotifierEdit" method="save">
       <result name="input">notifierJabber.jsp</result>
       <result name="success" type="chain">projectView</result>
     </action>
 
-    <action name="msnNotifierEdit" class="msnNotifierEdit">
-      <result name="input">notifierMsn.jsp</result>
-      <result name="success" type="chain">projectView</result>
+    <action name="msnNotifierEdit" class="msnNotifierEdit" method="edit">
+      <result name="success">notifierMsn.jsp</result>
     </action>
 
-    <action name="msnNotifierSave" class="msnNotifierEdit">
+    <action name="msnNotifierSave" class="msnNotifierEdit" method="save">
       <result name="input">notifierMsn.jsp</result>
       <result name="success" type="chain">projectView</result>
     </action>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierIrc.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierIrc.jsp?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierIrc.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierIrc.jsp Tue Sep 19 05:42:04
2006
@@ -18,7 +18,7 @@
         </h3>
 
         <div class="axial">
-          <ww:form action="ircNotifierSave.action" method="post">
+          <ww:form action="ircNotifierSave" method="post" validate="true">
             <ww:hidden name="notifierId"/>
             <ww:hidden name="projectId"/>
             <ww:hidden name="notifierType"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierJabber.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierJabber.jsp?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierJabber.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierJabber.jsp Tue Sep 19 05:42:04
2006
@@ -18,7 +18,7 @@
         </h3>
 
         <div class="axial">
-          <ww:form action="jabberNotifierSave.action" method="post">
+          <ww:form action="jabberNotifierSave" method="post" validate="true">
             <ww:hidden name="notifierId"/>
             <ww:hidden name="projectId"/>
             <ww:hidden name="notifierType"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMail.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMail.jsp?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMail.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMail.jsp Tue Sep 19 05:42:04
2006
@@ -18,7 +18,7 @@
         </h3>
 
         <div class="axial">
-          <ww:form action="mailNotifierSave.action" method="post">
+          <ww:form action="mailNotifierSave" method="post" validate="true">
             <ww:hidden name="notifierId"/>
             <ww:hidden name="projectId"/>
             <ww:hidden name="notifierType"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMsn.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMsn.jsp?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMsn.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierMsn.jsp Tue Sep 19 05:42:04
2006
@@ -18,7 +18,7 @@
         </h3>
 
         <div class="axial">
-          <ww:form action="jabberNotifierSave.action" method="post">
+          <ww:form action="msnNotifierSave" method="post" validate="true">
             <ww:hidden name="notifierId"/>
             <ww:hidden name="projectId"/>
             <ww:hidden name="notifierType"/>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierSelectType.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierSelectType.jsp?view=diff&rev=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierSelectType.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/notifierSelectType.jsp Tue Sep
19 05:42:04 2006
@@ -15,7 +15,7 @@
             <table>
               <tbody>
                 <ww:select label="%{getText('notifier.type.label')}" name="notifierType"
-                           list="#{ 'mail' : 'Mail', 'irc' : 'IRC', 'jabber' : 'Jabber',
'msn' : 'MSN'}"/>
+                           list="#@java.util.LinkedHashMap@{ 'mail' : 'Mail', 'irc' : 'IRC',
'jabber' : 'Jabber', 'msn' : 'MSN'}"/>
               </tbody>
             </table>
             <div class="functnbar3">

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=447833&r1=447832&r2=447833
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp Tue Sep 19 05:42:04
2006
@@ -80,7 +80,7 @@
             <ec:column property="from" title="projectView.notifier.from" cell="org.apache.maven.continuum.web.view.projectview.NotifierFromCell"/>
             <ec:column property="actions" title="&nbsp;">
                 <c:if test="${!pageScope.notifier.fromProject}">
-                    <a href='<ww:url value="${notifier.type}NotifierEdit!default.action">
+                    <a href='<ww:url value="${notifier.type}NotifierEdit.action">
                       <ww:param name="projectId" value="project.id"/>
                       <ww:param name="notifierId" value="${notifier.id}"/>
                     </ww:url>'>



Mime
View raw message