On 8/18/01 1:56 PM, "Sanders" <[EMAIL PROTECTED]> wrote:
> Oh, and the CallMethodRule should have a param count of 1 instead of 0.
Cool. Thanks for the tip :-)
> -----Original Message-----
> From: Sanders
> Sent: Saturday, August 18, 2001 10:55 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [digester] object creation from multiple xml files
>
>
> Jason,
>
> you just have it backwards. The CallMethodRule needs to be added prior
> to the CallParamRule. The CallParamRule depends on the CallMethodRule
> already being set up.
>
> Scott
>
> -----Original Message-----
> From: Jason van Zyl [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 18, 2001 8:09 AM
> To: [EMAIL PROTECTED]
> Subject: [digester] object creation from multiple xml files
>
>
> Hi,
>
> This is a little snippet of what I have:
>
> <profile>
> <project href="project/jakarta-ant"/>
> <profile>
>
> I would like to take the 'href' attribute and use it as a parameter in a
> method call. Currently I am using something like this:
>
> addObjectCreate("profile", profileClass);
> addCallParam("profile/project", 0, "href");
> addCallMethod("profile/project", "addProject", 0);
>
> I am getting a class cast exception in the addCallParam call. The
> documentation for the Digester is superb but I haven't been able to find
> any
> examples of using an attribute as a method parameter. Can someone point
> me
> in the right direction?
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons