[cvs] expresso commit by ppilgrim: `ActionError' IS deprecated and should be

JCorporate Ltd jcorp at jcorporate.com
Fri Jan 14 19:31:41 UTC 2005


Log Message:
-----------
`ActionError' IS deprecated and should be replaced by
`ActionMessage'. ActionErrors IS NOT deprecated.  For more info surf
to `http://wiki.apache.org/struts/StrutsUpgradeNotes11to124 '

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller:
        ErrorCollection.java

Revision Data
-------------
Index: ErrorCollection.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ErrorCollection.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ErrorCollection.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ErrorCollection.java -u -r1.19 -r1.20
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ErrorCollection.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ErrorCollection.java
@@ -66,7 +66,7 @@
 
 import com.jcorporate.expresso.kernel.exception.ChainedException;
 import org.apache.struts.Globals;
-import org.apache.struts.action.ActionError;
+import org.apache.struts.action.ActionMessage;
 import org.apache.struts.action.ActionErrors;
 
 import java.io.Serializable;
@@ -100,7 +100,7 @@
      */
     public void addError(String errorMessage) {
         if (!hasErrorMessage(errorMessage)) {
-            add(ActionErrors.GLOBAL_ERROR, new ActionError(errorMessage));
+            add(ActionErrors.GLOBAL_ERROR, new ActionMessage(errorMessage));
         }
     } /* addError(String) */
 
@@ -113,7 +113,7 @@
      */
     public void addError(String errorMessage, Object errorMessageParam1) {
         if (!hasErrorMessage(errorMessage)) {
-            add(ActionErrors.GLOBAL_ERROR, new ActionError(errorMessage, errorMessageParam1));
+            add(ActionErrors.GLOBAL_ERROR, new ActionMessage(errorMessage, errorMessageParam1));
         }
     } /* addError(String) */
 
@@ -128,7 +128,7 @@
      */
     public void addError(String errorMessage, Object errorMessageParam1, Object errorMessageParam2) {
         if (!hasErrorMessage(errorMessage)) {
-            add(ActionErrors.GLOBAL_ERROR, new ActionError(errorMessage, errorMessageParam1, errorMessageParam2));
+            add(ActionErrors.GLOBAL_ERROR, new ActionMessage(errorMessage, errorMessageParam1, errorMessageParam2));
         }
     } /* addError(String) */
 
@@ -148,7 +148,7 @@
                          Object errorMessageParam3) {
         if (!hasErrorMessage(errorMessage)) {
             add(ActionErrors.GLOBAL_ERROR,
-                    new ActionError(errorMessage, errorMessageParam1, errorMessageParam2, errorMessageParam3));
+                    new ActionMessage(errorMessage, errorMessageParam1, errorMessageParam2, errorMessageParam3));
         }
     } /* addError(String) */
 
@@ -159,7 +159,7 @@
      */
     public void addError(String errorMessage, Object[] args) {
         if (!hasErrorMessage(errorMessage)) {
-            add(ActionErrors.GLOBAL_ERROR, new ActionError(errorMessage, args));
+            add(ActionErrors.GLOBAL_ERROR, new ActionMessage(errorMessage, args));
         }
     } /* addError(String) */
 
@@ -174,10 +174,10 @@
         String oneMessage = null;
 
         /* Reject identical errors */
-        ActionError oneError = null;
+        ActionMessage oneError = null;
 
         for (Iterator allErrors = get(); allErrors.hasNext();) {
-            oneError = (ActionError) allErrors.next();
+            oneError = (ActionMessage) allErrors.next();
             oneMessage = oneError.getKey();
 
             if (oneMessage.equals(errorMessage)) {
@@ -226,7 +226,7 @@
      *             author  Adam Rossi, PlatinumSolutions
      */
     public void addError(String propName, String errorMessage) {
-        add(propName, new ActionError(errorMessage));
+        add(propName, new ActionMessage(errorMessage));
     } /* addError(String, String) */
 
 
@@ -251,7 +251,7 @@
     } /* getErrors() */
 
     /**
-     * Retrieve a list of error strings corresponding to the ActionError
+     * Retrieve a list of error strings corresponding to the ActionMessage
      *
      * @return array of Strings or null if there are no errors
      */
@@ -263,7 +263,7 @@
         String returnValue[] = new String[size()];
         int index = 0;
         for (Iterator i = this.getErrors(); i.hasNext();) {
-            returnValue[index] = ((ActionError) i.next()).getKey();
+            returnValue[index] = ((ActionMessage) i.next()).getKey();
             index++;
         }
 


More information about the cvs mailing list