NumberBoxItem redelivery = new NumberBoxItem("redeliveryDelay", "Redelivery Delay");
NumberBoxItem maxDelivery = new NumberBoxItem("maxDelivery", "Max Delivery Attempts");
form.setFields(dlQ, expQ, redelivery, maxDelivery);
FormHelpPanel helpPanel = new FormHelpPanel(new FormHelpPanel.AddressCallback(){
@Override
public ModelNode getAddress() {
ModelNode address = Baseadress.get();
address.add("subsystem", "messaging");
address.add("hornetq-server", "*");
address.add("address-setting", "*");
return address;
}
}, form);
FormToolStrip<AddressingPattern> formTools = new FormToolStrip<AddressingPattern>(
form,
new FormToolStrip.FormCallback<AddressingPattern>() {
@Override
public void onSave(Map<String, Object> changeset) {
presenter.onSaveAddressDetails(form.getEditedEntity(), changeset);
}
@Override
public void onDelete(AddressingPattern entity) {
}
}
);
ToolStrip tableTools = new ToolStrip();
ToolButton addBtn = new ToolButton(Console.CONSTANTS.common_label_add(), new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
presenter.launchNewAddrDialogue();
}
});
addBtn.ensureDebugId(Console.DEBUG_CONSTANTS.debug_label_add_addressingDetails());
tableTools.addToolButtonRight(addBtn);
ToolButton removeBtn = new ToolButton(Console.CONSTANTS.common_label_delete(), new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Feedback.confirm(
Console.MESSAGES.deleteTitle("Addressing Config"),
Console.MESSAGES.deleteConfirm("Addressing Config"),
new Feedback.ConfirmationHandler() {
@Override
public void onConfirmation(boolean isConfirmed) {
if (isConfirmed)
presenter.onDeleteAddressDetails(form.getEditedEntity());
}
});
}
});
tableTools.addToolButtonRight(removeBtn);
VerticalPanel formPanel = new VerticalPanel();
formPanel.addStyleName("fill-layout-width");
formPanel.add(helpPanel.asWidget());
formPanel.add(formTools.asWidget());
formPanel.add(form.asWidget());
serverName = new ContentHeaderLabel();