commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alister Pate" <>
Subject [Betwixt] Newbie question about loading lists
Date Fri, 16 Feb 2007 02:26:48 GMT

I'm pretty new to Betwixt, so forgive me if this is an unbearably stupid

I have a list of simple beans. Each bean contains a couple of simple
attributes (Strings) and a Collection of Strings:

Public class ReportDef
	private String displayName;
	private String reportName;
	private Collection fieldNames;
	public ReportDef(){}
(I have the requisite setters and getters, plus a method public void
addFieldName(String field))

I have successfully used betwixt to create my xml document where the top
level element (which is a list) is mapped to the name ReportDefinitions

    <ReportDef displayName="audit" reportName="Audit">
    <ReportDef displayName="a report" reportName="report">

I try to read it back in,  using the following code:

		BeanReader reader = new BeanReader();

//		Set the custom mappings

//		reader.getBindingConfiguration().
//		Retrieve the list of elements from the config file
		ArrayList list = (ArrayList)reader.parse(in);

The attributes are correctly set, but the fieldNames element is not set,
remaining null.

What am I doing wrong?

This email is intended solely for the use of the addressee
and may contain information that is confidential or privileged.
If you receive this email in error please notify the sender and
delete the email immediately.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message