I_Vie vie = Vie.getInstance();
ContentDefinition definition = generateContentDefinition();
I_Entity person = register(vie, definition);
WidgetService service = new WidgetService();
service.init(definition);
service.addWidgetFactory("string", new I_WidgetFactory() {
public I_FormEditWidget createFormWidget(String configuration) {
return new FormWidgetWrapper(new StringWidget());
}
public I_EditWidget createInlineWidget(String configuration, Element element) {
return new StringWidget(element);
}
});
service.addWidgetFactory("html", new I_WidgetFactory() {
public I_FormEditWidget createFormWidget(String configuration) {
return new FormWidgetWrapper(new TinyMCEWidget(null));
}
public I_EditWidget createInlineWidget(String configuration, Element element) {
return new TinyMCEWidget(element, null);
}
});
I_EntityRenderer defaultRenderer = new Renderer(vie, service);
service.setDefaultRenderer(defaultRenderer);
FormParent formParent = new FormParent(RootPanel.get("inline_form"));
I_EntityRenderer renderer = service.getRendererForType(vie.getType(personTypeName));
renderer.renderInline(person, formParent, null);
((Entity)person).addValueChangeHandler(new ValueChangeHandler<Entity>() {
public void onValueChange(ValueChangeEvent<Entity> event) {