DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29679>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29679

Validator returns ActionErrors instead of ActionMessages





------- Additional Comments From [EMAIL PROTECTED]  2004-06-19 00:24 -------
I believe that ActionErrors and the validate() method which returns ActionErros 
in ActionForm should also have been deprecated. That would then have told 
everyone clearly that ActionMessages/ActionMessage are the new replacement for 
ActionErrors/ActionError.

I'm guessing that the reason this wasn't done was because of the validate 
method in ActionForm. Changing the method to return ActionMessages would break 
backward compatibility and it can't be overloaded when only the return type is 
different. The logic then follows that if we're not going to deprecate the 
validate method, then we can't deprecate ActionErrors.

I beleieve we could resolve this by using the ActionConfig class in the validate
() method instead of ActionMapping. The comments in the ActionMapping class say 
that it would have been deprecated in favour of ActionConfig, except that the 
public API depends on it. Adding a new validate() method which uses 
ActionConfig would be in keeping with the direction that Struts is moving in,  
would allow backward compatibility to be retained and would allow ActionErrors 
and the existing validate() method to be deprecated.

public ActionMessages validate(ActionConfig config,
                              HttpServletRequest request)
      throws Exception {

   // For backward compatibility
   return validate((ActionMapping)config, request);

}

Any opinions?

Niall

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to