betwixt list xml to bean problem, please help



Hi,

I've been using betwixt for a couple of days, really new to this
library. Anyway, using the sample provided on the site, have been
able to write simple beans to xml and then back again. However, when
I tried to use a bean that had a List of other beans, I got a weird
result. The xml is created properly, but when I try to create the
bean from xml, an empty object array is created of correct length but
with null values. If the list contained only one element, then
everythign works correctly. The list always has the same type of
object, a Widget. What am I doing wrong or what am I not doing. Tried
with betwixt 0.6 to 0.8. Thank you in advance for your comments!

Here is the class that was written to xml and back:

public class WidgetList implements Serializable {
private List widgets = new ArrayList();

public List getWidgets() {
return widgets;
}
public void addWidget(Widget widget) {
widgets.add(widget);
}
public void setWidgets(List widgets) {
this.widgets = widgets;
}
}

.



Relevant Pages

  • Re: betwixt list xml to bean problem, please help
    ... I forgot to add the add method for the Widget class. ... I tried to use a bean that had a List of other beans, ... The xml is created properly, but when I try to create the ... public void addWidget{ ...
    (comp.lang.java.programmer)
  • Re: De/Komprimieren mit zlibwapi.dll V1.2.3.0 oder lzo.dll V1.08
    ... VB-Sourcecode erzeugt werden (ohne XML)? ... Das wären dann 4 Dlls: RPC, SQLite, RichClient (die Widgets) ... dhF aufgefallen, ...
    (microsoft.public.de.vb)
  • Re: Java im Zeitalter von Vista
    ... Da schreibst Du die Logik zur Erzeugung der Widgets und Dialoge 40-50 mal. ... Bei einem Datenformat wie XML definierst Du nur die Dialog-Struktur und bereits vorhandener, funktionierender Code erzeugt daraus die Dialoge und Widgets. ...
    (de.comp.lang.java)
  • Re: Java im Zeitalter von Vista
    ... Da schreibst Du die Logik zur Erzeugung der Widgets und Dialoge 40-50 mal. ... Bei einem Datenformat wie XML definierst Du nur die Dialog-Struktur und bereits vorhandener, funktionierender Code erzeugt daraus die Dialoge und Widgets. ...
    (de.comp.lang.java)