Widget asWidget() {
VerticalPanel layout = new VerticalPanel();
layout.addStyleName("window-content");
final DefaultCFForm defaultAttributes = new DefaultCFForm(
new FormToolStrip.FormCallback<ConnectionFactory>() {
@Override
public void onSave(Map<String, Object> changeset) {
}
@Override
public void onDelete(ConnectionFactory entity) {
}
},false
);
defaultAttributes.getForm().setNumColumns(1);
defaultAttributes.getForm().setEnabled(true);
defaultAttributes.setIsCreate(true);
layout.add(defaultAttributes.asWidget());
DialogueOptions options = new DialogueOptions(
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Form<ConnectionFactory> form = defaultAttributes.getForm();
FormValidation validation = form.validate();
if(!validation.hasErrors())
presenter.onCreateCF(form.getUpdatedEntity());
}
},