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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13638

add Config Factory





------- Additional Comments From [EMAIL PROTECTED]  2002-10-16 15:38 -------
Hi,

Please IGNORE the first attachement (10/16/02 10:33).

Actually I've got a working solution. I only modified the file ConfigRuleSet.
Two files was added : 
- org/apache/struts/config/ConfigFactory.java
- org/apache/struts/config/LocalStrings.properties

Factory usage :


The class ConfigFactory extends AbstractObjectCreationFactory (from commons-
digester) and provide all config classes (except PlugIn).

The user can override this factory and provide new config classes, but theses 
classes must be compatible with default struts config classes.


-------
Usage :
-------

Simply override method like this :

package com.cross.example.config;

import org.apache.struts.config.ConfigFactory;

public class MyConfigFactory extends ConfigFactory {

    public Class getActionConfigClass() {
        return MyActionConfig.class;
    }
}

---------------
Configuration :
---------------

Simply configure like this :

<struts-config factoryClass="com.cross.example.config.MyConfigFactory">
  ...
</struts-config>

--------------------------------------

I will attach a patch for ConfigRuleSet and the two new files. There is only 
one ambigous point, the ApplicationConfig.getActionMappingClass and the 
type="..." attribute. ??? This solution use it but it's not pretty elegant ?



-emmanuel

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

Reply via email to