@Override
  public void onConfirm(ClickEvent event) {
    // new types
    for (int i = 0; i < nodeTypes.length; i++) {
      boolean isNew = true;

      for (int j = 0; j < originalNodeTypes.length; j++) {
        if (nodeTypes[i].equalsIgnoreCase(originalNodeTypes[j])) {
          isNew = false;
          break;
        }
      }

      if (isNew) contents.addMixin(nodeTypes[i]);
    }

    // removed types
    for (int i = 0; i < originalNodeTypes.length; i++) {
      boolean isRemoved = false;

      for (int j = 0; j < nodeTypes.length; j++) {
        if (originalNodeTypes[i].equalsIgnoreCase(nodeTypes[j])) {
          isRemoved = false;
          break;
        }
      }

      if (isRemoved) contents.removeMixin(nodeTypes[i]);
    }
  }
  @Override
  public void showModal() {
    contents
        .jcrService()
        .getMixinTypes(
            contents.repository(),
            contents.workspace(),
            false,
            new AsyncCallback<String[]>() {
              @Override
              public void onFailure(Throwable caught) {
                SC.say(caught.getMessage());
              }

              @Override
              public void onSuccess(String[] result) {
                allTypes = result;
                updateLists();
                MixinValueEditor.super.showModal();
              }
            });
  }