[cvs] expresso commit by rauld: Removed calls to deprecated constants

JCorporate Ltd jcorp at jcorporate.com
Thu Feb 17 17:38:33 UTC 2005


Log Message:
-----------
Removed calls to deprecated constants

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

Revision Data
-------------
Index: DefaultForm.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/DefaultForm.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/DefaultForm.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/DefaultForm.java -u -r1.22 -r1.23
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/DefaultForm.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/DefaultForm.java
@@ -154,7 +154,7 @@
 
     /**
      * Set all of the fields using a hastable of parameters
-     * 
+     *
      * @param parameters values to set
      * @throws ControllerException on error
      */
@@ -188,7 +188,7 @@
 
     /**
      * Returns the attributes Hashtable.
-     * 
+     *
      * @return Hashtable of all attributes
      */
     public Hashtable getAttributes() {
@@ -260,9 +260,9 @@
 
     /**
      * Get the state requested by the transition button in the form
-     * 
+     *
      * @param request the servlet request we are processing
-     * 
+     *
      * @return String
      * @throws ControllerException
      */
@@ -392,7 +392,7 @@
      * @param page This in conjunction with  the page property of a
      * <code>Field<code> can control the processing of fields.  If the field's
      * page is less than or equal to this page value, it will be processed.
-     * 
+     *
      * @return Validator the initialized Validator
      */
     public Validator initValidator(String key,
@@ -412,13 +412,10 @@
 
         validator.setPage(page);
 
-        validator.setParameter(Resources.
-                SERVLET_CONTEXT_KEY, application);
-        validator.setParameter(Resources.
-                HTTP_SERVLET_REQUEST_KEY, request);
+        validator.setParameter(SERVLET_CONTEXT_PARAM, application);
+        validator.setParameter(HTTP_SERVLET_REQUEST_PARAM, request);
         validator.setParameter(Validator.LOCALE_PARAM, locale);
-        validator.setParameter(Resources.
-                ACTION_ERRORS_KEY, errors);
+        validator.setParameter(ACTION_MESSAGES_PARAM, errors);
         validator.setParameter(Validator.BEAN_PARAM, bean);
 
         return validator;
@@ -439,5 +436,24 @@
      * Commons Logging instance.
      */
     private static Log log = LogFactory.getLog(DefaultForm.class);
+
+    /**
+     * Resources key the <code>ServletContext</code> is stored under.
+     */
+    private static String SERVLET_CONTEXT_PARAM = "javax.servlet.ServletContext";
+
+    /**
+     * Resources key the <code>HttpServletRequest</code> is stored under.
+     */
+    private static String HTTP_SERVLET_REQUEST_PARAM =
+        "javax.servlet.http.HttpServletRequest";
+
+    /**
+     * Resources key the <code>ActionMessages</code> is stored under.
+     */
+    private static String ACTION_MESSAGES_PARAM =
+        "org.apache.struts.action.ActionMessages";
+
+
 
 }


More information about the cvs mailing list