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