form.setFields(socket, ssl, user, pass);
form.setEnabled(false);
form.setNumColumns(2);
FormToolStrip formTools = new FormToolStrip(form,
new FormToolStrip.FormCallback<MailServerDefinition>() {
@Override
public void onSave(Map<String, Object> changeset) {
presenter.onSaveServer(form.getEditedEntity().getType(), changeset);
}
@Override
public void onDelete(MailServerDefinition entity) {
}
});
headline = new HTML();
headline.setStyleName("content-header-label");
final FormHelpPanel helpPanel = new FormHelpPanel(
new FormHelpPanel.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = Baseadress.get();
address.add("subsystem", "mail");
address.add("mail-session", "*");
address.add("server", "smtp");
return address;
}
}, form
);
VerticalPanel formlayout = new VerticalPanel();
formlayout.setStyleName("fill-layout-width");
formlayout.add(helpPanel.asWidget());
formlayout.add(form.asWidget());
MultipleToOneLayout layout = new MultipleToOneLayout()
.setPlain(true)
.setHeadlineWidget(headline)
.setDescription(description)
.setMaster(Console.MESSAGES.available("Mail Server"), table)
.setMasterTools(tableTools)
.setDetailTools(formTools.asWidget())
.setDetail(Console.CONSTANTS.common_label_selection(), formlayout);
form.bind(table);