Hi there,

I'd like you to consider the following small patches I've made.
These patches do not affect normal Struts operation, but are intended to 
make it easier to override certain classes to provide different 
implementations.

The DynaActionForm changes the type of "dynaClass" to the type 
DynaActionFormClass. As far as I can see the DynaActionFormClass is used 
to configure the DynaActionForm using the struts-config XML file. I've 
written my own DynaActionForm implementation which doesn't use the 
struts-config configuration so it can only provide a simple DynaClass. 
The configuration functionality of DynaActionFormClass is only used at 
configuration time, so there's no functionality lost and some 
flexibility gained.

The MessageResourcesConfig patch sets a default key under which the 
MessageResources instance is stored. This makes it easier to provide a 
custom MessageResources object.

If there's any other way this functionality can be provided I'm very 
interested, otherwise I'd like submit these patches for inclusion.

greets,
Klaasjan Brand
--- src/share/org/apache/struts/action/DynaActionForm.java      Fri Jan 18 04:46:52 
2002
+++ 
+/home/kj/eclipse/workspace/jakarta-struts/src/share/org/apache/struts/action/DynaActionForm.java
+    Wed Mar 13 12:48:49 2002
@@ -97,7 +97,7 @@
     /**
      * The DynaActionFormClass with which we are associated.
      */
-    protected DynaActionFormClass dynaClass = null;
+    protected DynaClass dynaClass = null;
 
 
     /**
--- old/MessageResourcesConfig.java     Wed Apr  3 16:55:50 2002
+++ new/MessageResourcesConfig.java     Wed Apr  3 16:55:33 2002
@@ -65,6 +65,8 @@
 
 import java.io.Serializable;
 
+import org.apache.struts.action.Action;
+
 
 /**
  * <p>A JavaBean representing the configuration information of a
@@ -114,7 +116,7 @@
      * The servlet context attributes key under which this MessageResources
      * instance is stored.
      */
-    protected String key = null;
+    protected String key = Action.MESSAGES_KEY;
 
     public String getKey() {
         return (this.key);

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

Reply via email to