commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Thorhauer <>
Subject composite property/bean question
Date Wed, 26 Jun 2002 00:40:42 GMT

I am just starting to use betwixt and I have a couple of questions.  I
am working with a small example .xml file that I am trying to map to a
couple of beans.  The problem that I am having is that the
setCompdescription() method in the Componenttest bean is not being
called by betwixt.  It does appear that betwixt is loading 3 new
Componenttest objects for the example .xml file below but it is not
calling the setCompdescription() method.

Any help with this is much appreciated.  I have included summary
versions of each of the files that I am using.

The xml file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
        <compdescription>Paper Cover</compdescription>

I want to map this xml file to 2 beans.  The Beans look like this

public class POTest
    private List componenttests;
    private String printingNumber = "";

    public POTest(){componenttests = new ArrayList();}

    public List getComponenttests()

    public void addComponenttest(Componenttest c)

    public void setPrintingNumber(String s)

    public String getPrintingNumber()

public class Componenttest
    private String compDescription = "";

    public Componenttest(){}

    public void setCompdescription(String s)

    public String getCompdescription()

I used the following POTest.betwixt map:

<?xml version="1.0" encoding="UTF-8" ?>
<info primitiveTypes="element">
  <element name="content">
    <element name="printingno" property="printingNumber"/>

    <element name="componenttest" property="componenttests">
       <element name="compdescription" property="compdescription">


** John Thorhauer
** take a look at:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message