PackagingDataSource ds = new PackagingDataSource();
ds.setDefaultSource(new MemoryDataSource());
MyModel pojo = new MyModel();
ds.addPackage(DataSource.PACKAGE_PERSISTENT, new PojoDataSource(pojo));
LayoutModelByConfig layout = new LayoutModelByConfig();
layout.setNls(nls);
layout.setDefinition(model);
layout.setDataSource(ds);
layout.setFormControl(control);
layout.setFormFactory(builder.getFormFactory());
layout.doBuild();
builder.setRoot(layout.getRoot());
// builder.getRoot().dump(System.out, 0);
builder.doBuild();
builder.getRootComposit().setWidth("800px");
mainWindow.addComponent(builder.getRootComposit());