commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Digester mixing simple and complex properties
Date Thu, 14 Apr 2005 18:14:53 GMT
Hi all,
I'm brand-spanking-new to the Digester.  I'd like to use nested
properties because some are quite long and cumbersome to specify as xml
attributes.  I'd also like to use complex properties.  I can't figure
out the rules, however.  Suppose I have this:
  <name>foo name</name>
    <name>bar name</name>
If my rules look like this:
        digester.addObjectCreate("foo", Foo.class);
        digester.addObjectCreate("foo/bar", Bar.class);
        digester.addSetNext("foo/bar", "setBar");

I get "java.lang.NoSuchMethodException: Bean has no property named bar."
If I comment out the addSetNestedProperties("foo") it's ok (foo, bar,
and bar name get populated) except that foo's nested props are ignored.
I've also tried addSetNestedProperties("foo", "bar", null) to no avail.
Is it possible to mix properties like this?  If so, how?
John Gregg
Application Systems Engineer
Wells Fargo Private Client Services Technology

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