View Javadoc

1   // $Id: ActionErrorUtils.java,v 1.1 2004/04/01 08:30:48 powerpete Exp $
2   package com.pnpconsult.zeiterfassung.util;
3   
4   import org.apache.struts.action.ActionError;
5   import org.apache.struts.action.ActionErrors;
6   
7   /***
8    * @author <a href="mailto:powerpete@users.sf.net">Moritz Petersen</a>
9    * @version $Id: ActionErrorUtils.java,v 1.1 2004/04/01 08:30:48 powerpete Exp $
10   */
11  public class ActionErrorUtils
12  {
13  	/***
14       * Adds a new ActionError to the ActionErrors, where the key is used
15       * as property and as error message key.
16       * 
17  	 * @param errors   The ActionErrors.
18  	 * @param key      The key, that is used as property key and error message
19       *                  key.
20  	 */
21  	public static void add(ActionErrors errors, String key)
22  	{
23          errors.add(key, new ActionError(key));
24  	}
25  
26  	public static void add(ActionErrors errors, String key, String value0)
27  	{
28          errors.add(key, new ActionError(key, value0));
29  	}
30  
31  }