ActivatorControl control = new ActivatorControl();
control.setFocusManager(new InformationFocus());
LayoutModelByConfig layout = new LayoutModelByConfig();
layout.setNls(new MNls(MSystem.locateResource(this, "form1.properties").toURI()));
layout.setDefinition(MConfigFactory.getInstance().createConfigFor(MSystem.locateResource(this, "form1.xml").toURI()));
layout.setFormControl(control);
PackagingDataSource ds = new PackagingDataSource();
Properties data = new Properties();
data.load(MSystem.locateResource(this, "form1_data.properties").openStream());
ds.setDefaultSource(new MemoryDataSource(data));
MyModel pojo = new MyModel();
ds.addPackage("my", new PojoDataSource(pojo));
layout.setDataSource(ds);
layout.doBuild();
VaadinFormBuilder builder = new VaadinFormBuilder();
builder.setFormFactory(new LayoutFactory());
builder.setRoot(layout.getRoot());
// builder.getRoot().dump(System.out, 0);
builder.doBuild();
builder.getRootComposit().setWidth("800px");
mainWindow.addComponent(builder.getRootComposit());