@Override
  public void onDeleteMetadataSelectedHandler(DeleteMetadataSelectedEvent event) {
    final MetadataTemplateInfo template = event.getTemplateInfo();
    ConfirmMessageBox cmb = new ConfirmMessageBox("Confirm", appearance.deleteTemplateConfirm());
    cmb.addDialogHideHandler(
        new DialogHideHandler() {

          @Override
          public void onDialogHide(DialogHideEvent event) {
            if (event.getHideButton().equals(PredefinedButton.OK)
                || event.getHideButton().equals(PredefinedButton.YES)) {
              mdSvcFac.deleteTemplate(
                  template.getId(),
                  new AsyncCallback<String>() {

                    @Override
                    public void onFailure(Throwable caught) {
                      ErrorHandler.post(appearance.deleteTemplateError(), caught);
                    }

                    @Override
                    public void onSuccess(String result) {
                      IplantAnnouncer.getInstance()
                          .schedule(
                              new SuccessAnnouncementConfig(appearance.deleteTemplateSuccess()));
                      loadTemplates();
                    }
                  });
            }
          }
        });
    cmb.show();
    setMsgBoxDebugIds(cmb);
  }
 private IPlantDialog createEditDialog() {
   final IPlantDialog d = new IPlantDialog();
   d.setHeadingText(appearance.templateAttributeEditorHeading());
   editView.reset();
   d.add(editView.asWidget());
   d.setSize("800px", "600px");
   d.setHideOnButtonClick(false);
   return d;
 }