//Creating form :-)
FormWidget voForm = new FormWidget();
voForm._getComponent().init(new MockEnviroment());
//Adding elements to form
voForm.addElement("booleanValue", "vo checkbox", new CheckboxControl(), new BooleanData(), true);
voForm.addElement("stringValue", "vo text", new TextControl(), new StringData(), true);
voForm.addElement("longValue", "vo long", new TextControl(), new LongData(), true);
//Adding a composite element
FormWidget subTestVO = voForm.addSubForm("subTestVO");
subTestVO.addElement("booleanValue", "vo checkbox", new CheckboxControl(), new BooleanData(), true);
subTestVO.addElement("stringValue", "vo text", new TextControl(), new StringData(), true);
subTestVO.addElement("longValue", "vo long", new TextControl(), new LongData(), true);
return voForm;
}