commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Papastamatopoulos <geor...@lawlex.com.au>
Subject [betwixt] WrapCollectionsInElement ignored when element is specified in .betwixt file
Date Wed, 05 May 2004 06:10:24 GMT
Hi

Im having some troubles that hopefully someone can help me with.  I have 
a bean that I'm converting to xml, but want to control the order of the 
xml elements, and their names, so I've defined a .betwixt file to do this.

<beanSnippet>
...
  public List getMyElements()
  {
     return elements;
  }
</beanSnippet>

<.betwixtSnippet>
..
 <element name="newNames" property="myElements"/>
<.betwixtSnippet>

Problem is, that when I specify the property as an element, betwixt 
doesn't wrap the collection in a containing element, even though I've 
specfied the wrapCollectionsInElement property to be true, but rather 
renders each individual element as "<newNames .../>".  When I remove the 
reference from the betwixt file, I get what I'm after (elements, wrapped 
in a containing element).

<myElements>
  <myElement/>
 ...
</myElements>

Is this expected behaviour?  Am I missing something?  Am Im able to 
define elements in the betwixt file and still get the behaviour I'm after. 

Thanks for listening.
George

-- 
___________________________
George Papastamatopoulos

Lawlex Compliance Solutions
+61 3 9278 1182
___________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message