commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [digester] How to provide CallMethodRule parameter from code, no t xml?
Date Thu, 20 Mar 2003 20:23:39 GMT
hi eric

(if i understand what you mean correctly) i don't think that there's a way 
to do this. it should be pretty easy to add a new constructor to 
CallParamRule

CallParamRule(Object value, int paramIndex)

which passes that parameter to the CallMethod. i'll take a look at adding 
this when i get a little time or a patch would be gratefully received :)

- robert

On Thursday, March 20, 2003, at 07:08 PM, EPugh@upstate.com wrote:

> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message