Hi,

I read up on the Betwixt changelog that it now supports suppression of empty
collections. Am not able to obtain this functionality though. Here's a code
snippet:
public class Something {
   ArrayList persons = new ArrayList();
   ArrayList cities = new ArrayList();
   ArrayList temps = null;
   public Collection getTempCollection() {
       return temps;
   }
   public void addTemp(Person p) {
       temps.add(p);
   }
   //adders and getters for the other two
   // beanWriter configuration:
      beanWriter.setWriteEmptyElements(false);
      beanWriter.getBindingConfiguration().setValueSuppressionStrategy(
ValueSuppressionStrategy.SUPPRESS_EMPTY);


When I write out the XML with some sample data, this is what I see...
<?xml version='1.0' ?>
...............................
     <person>
       <name>p1</name>
       <number>1</number>
     </person>
   </personCollection>
   <tempCollection/>
 </Something>


Can someone please help explain why I still see the <tempCollection/> tag??

Cheers!!

Reply via email to