Hi,

somehow, I don't think I'm initializing the global properties correctly.
I'm not getting my validation errors to come through the error tag.
I've set break points in the following code of the "public class
ActionErrors implements Serializable"
class.  My LoginAction Class calls this code as follows:

        if ( emailaddress.compareTo("PETER") == 0  ) {
            errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("error.password.mismatch") );
        }


what is happening is the ArrayList (list) is not getting anything stuffed in
it.
That is, errors.get("error.password.mismatch") is returning a null.  I'm
stymied.
Any idea?


   /**
     * Add an error message to the set of errors for the specified property.
     *
     * @param property Property name (or ActionErrors.GLOBAL_ERROR)
     * @param error The error message to be added
     */
    public void add(String property, ActionError error) {

        ArrayList list = (ArrayList) errors.get(property);
        if (list == null) {
            list = new ArrayList();
            errors.put(property, list);
        }
        list.add(error);

    }

Reply via email to