nbubna 2004/03/12 15:43:08 Modified: src/java/org/apache/velocity/tools/struts ActionMessagesTool.java ErrorsTool.java StrutsUtils.java Log: switch from StrutsUtils' getActionErrors() and getActionMessages() (deprecated in 1.1) to getErrors() and getMessages() Revision Changes Path 1.9 +2 -2 jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ActionMessagesTool.java Index: ActionMessagesTool.java =================================================================== RCS file: /home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ActionMessagesTool.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ActionMessagesTool.java 18 Feb 2004 20:09:51 -0000 1.8 +++ ActionMessagesTool.java 12 Mar 2004 23:43:08 -0000 1.9 @@ -78,7 +78,7 @@ //setup superclass instance members super.init(obj); - this.actionMsgs = StrutsUtils.getActionMessages(this.request); + this.actionMsgs = StrutsUtils.getMessages(this.request); } 1.14 +2 -2 jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ErrorsTool.java Index: ErrorsTool.java =================================================================== RCS file: /home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ErrorsTool.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ErrorsTool.java 12 Mar 2004 20:50:38 -0000 1.13 +++ ErrorsTool.java 12 Mar 2004 23:43:08 -0000 1.14 @@ -61,7 +61,7 @@ //setup superclass instance members super.init(obj); - this.actionMsgs = StrutsUtils.getActionErrors(this.request); + this.actionMsgs = StrutsUtils.getErrors(this.request); } 1.20 +10 -11 jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsUtils.java Index: StrutsUtils.java =================================================================== RCS file: /home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsUtils.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- StrutsUtils.java 12 Mar 2004 20:39:07 -0000 1.19 +++ StrutsUtils.java 12 Mar 2004 23:43:08 -0000 1.20 @@ -181,30 +181,29 @@ /*********************** Struts Request Resources ****************/ /** - * Returns the <code>org.apache.struts.action.ActionErrors</code> - * object for this request or <code>null</code> if none exists. + * Returns the Struts errors for this request or <code>null</code> + * if none exist. * * @param request the servlet request + * @since VelocityTools 1.1 */ - public static ActionErrors getActionErrors(HttpServletRequest request) + public static ActionMessages getErrors(HttpServletRequest request) { - return (ActionErrors)request.getAttribute(Globals.ERROR_KEY); + return (ActionMessages)request.getAttribute(Globals.ERROR_KEY); } - /** - * Returns the <code>org.apache.struts.action.ActionMessages</code> - * object for this request or <code>null</code> if none exists. + * Returns the Struts messages for this request or <code>null</code> + * if none exist. * * @param request the servlet request * @since VelocityTools 1.1 */ - public static ActionMessages getActionMessages(HttpServletRequest request) + public static ActionMessages getMessages(HttpServletRequest request) { return (ActionMessages)request.getAttribute(Globals.MESSAGE_KEY); } - /** * Returns the <code>ActionForm</code> bean associated with * this request of <code>null</code> if none exists. @@ -394,7 +393,7 @@ HttpSession session, ServletContext application) { - ActionErrors errors = getActionErrors(request); + ActionMessages errors = getErrors(request); if (errors == null) { return "";
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]