protected void load(IConfig layout, LComposite composite) {
for ( IConfig element : layout.getConfigBundle("element") ) {
LObject next = null;
String type = element.getString("type", "field");
if (type.equals("field")) {
next = new LField();
} else
if (type.equals("page")) {
next = new LPage();
load(element,(LComposite) next);
} else
if (type.equals("tabbed")) {
next = new LTabbed();
load(element,(LComposite) next);
for ( IConfig element2 : element.getConfigBundle("element") ) {
LComposite next2 = new LComposite();
next2.setConfig(element2);
next2.setModel(this, model);
((LComposite)next).add(next2);
load(element2,next2);
}
} else
if (type.equals("group")) {
next = new LGroup();
load(element,(LComposite) next);
}
if (next != null) {
next.setModel(this,model);
next.setConfig(element);
next.init();
composite.add(next);
}
}