form.setFields(contextName, workmanager);
form.setNumColumns(2);
form.bind(table);
SafeHtmlBuilder description = new SafeHtmlBuilder();
description.appendHtmlConstant(Console.CONSTANTS.subsys_jca_boostrap_config_desc());
FormToolStrip<JcaBootstrapContext> formTools = new FormToolStrip<JcaBootstrapContext>(
form,
new FormToolStrip.FormCallback<JcaBootstrapContext>() {
@Override
public void onSave(Map<String, Object> changeset) {
presenter.onSaveBootstrapContext(form.getEditedEntity(), changeset);
}
@Override
public void onDelete(JcaBootstrapContext entity) {
}
}
);
formTools.providesDeleteOp(false);
final FormHelpPanel helpPanel = new FormHelpPanel(
new FormHelpPanel.AddressCallback() {
@Override
public ModelNode getAddress() {
ModelNode address = Baseadress.get();
address.add("subsystem", "jca");
address.add("bootstrap-context", "*");
return address;
}
}, form
);
VerticalPanel formPanel = new VerticalPanel();
formPanel.setStyleName("fill-layout-width");
formPanel.add(formTools.asWidget());
formPanel.add(helpPanel.asWidget());
formPanel.add(form.asWidget());
Widget panel = new MultipleToOneLayout()
.setPlain(true)
.setTitle("Bootstrap")
.setHeadline("JCA Bootstrap Contexts")
.setDescription(description.toSafeHtml())
.setMaster(Console.MESSAGES.available("Bootstrap Context"), table)
.setTopLevelTools(topLevelTools.asWidget())
.setDetail(Console.CONSTANTS.common_label_selection(), formPanel)
.build();