Could you send the complete code you are using to read with? Tim
-----Original Message----- From: Matt Goodwin [mailto:[EMAIL PROTECTED] Sent: Thu 1/13/2005 2:58 PM To: Jakarta Commons Users List Subject: Re: [betwixt] Collection property question I have that set. It appears that my class is not being recognized in the parse process. My add method on my class is never called. Matt Jason Wood wrote: >I think you want this ... > > IntrospectionConfiguration.setWrapCollectionsInElement(false) > >Jason > >-----Original Message----- >From: Matt Goodwin [mailto:[EMAIL PROTECTED] >Sent: Thursday, January 13, 2005 11:02 AM >To: Jakarta Commons Users List >Subject: [betwixt] Collection property question > > >I have xml I need to map to my bean. It is very similar to the >CustomerBean example, except I am using Collection instead of and array >of objects (i.e. Order[]). Here is a sample of the xml, followed by my >class, followed by my .betwixt file. The problem I am having is the >List is always null. How do you map objects in the .betwixt file if the >collection has no surrounding element tag (i.e. ><orders></order></order></orders>)? > >Example xml: ><AgentStatementVO> > <StatementDate>2004/10/08</StatementDate> > <AgentInfoVO>...</AgentInfoVO> > <AgentStatementLineVO>...</AgentStatementLineVO> > <AgentStatementLineVO>...</AgentStatementLineVO> > <AgentEarningsVO>...</AgentEarningsVO> ></AgentStatementVO> > >Class: >public class AgentStatement implements java.io.Serializable { > private Date statementDate; > private AgentInfo agentInfo; > private Collection agentStatementDetails = new java.util.ArrayList(); > private AgentEarning agentEarning; > /* .. snip non-relevant getters/setters */ > public Collection getAgentStatementDetails() { > return agentStatementDetails; > } > public void setAgentStatementDetails(Collection agentStatementDetails) { > this.agentStatementDetails = agentStatementDetails; > } > public void addAgentStatementDetail(AgentStatementDetail >agentStatementDetail) { > this.agentStatementDetails.add(agentStatementDetail); > } >} > >Betwixt file: ><?xml version='1.0' ?> ><info> > <element name='AgentStatementVO'> > <element name='StatementDate' property='statementDate'/> > <element name='AgentInfoVO' property='agentInfo'/> > <element name='AgentStatementLineVO' >property='agentStatementDetails' >class='com.equitrust.commissionloader.beans.AgentStatementDetail'/> > <element name='AgentEarningsVO' property='agentEarning'/> > </element> ></info> > >Everything except the agentStatementDetails are populated correctly. > >Thanks, > >Matt > > > -- Matt Goodwin [EMAIL PROTECTED] (515)708-0114 Metalexis "Transcending the Ordinary" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]