commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EP...@upstate.com
Subject [digester] How to provide CallMethodRule parameter from code, no t xml?
Date Thu, 20 Mar 2003 19:08:01 GMT
Hi all,

I have a factory class that is using digester to load up a series of
objects:
       digester.addObjectCreate(
            "configuration/properties",
            "org.apache.commons.configuration.PropertiesConfiguration");
        digester.addSetProperties("configuration/properties");
        digester.addCallMethod("configuration/properties", "load");
        digester.addCallMethod(
            "configuration/properties",
            "setBasePath",
            1,
            new String[] {"java.lang.String"});
 

However, for my property setBasePath, I want to pass in the value of the
property not from XML, but from my factory method.  The basePath is not in
the XML file currently.  If the value was in the XML, I would do:
	digester.addCallParam("configuration/properties/prop1", 0);

What am I missing?

Eric Pugh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message