@Override
  public void onClick(ClickEvent event) {
    super.onClick(event);

    OdkTablesAddNewTablePopup popup = new OdkTablesAddNewTablePopup();
    popup.setPopupPositionAndShow(popup.getPositionCallBack());
  }
  public OdkTablesConfirmDeleteTableFilePopup(
      AggregateSubTabBase basePanel, String odkClientApiVersion, String tableId, String filePath) {
    super();
    this.basePanel = basePanel;
    this.odkClientApiVersion = odkClientApiVersion;
    this.tableId = tableId;
    this.filePath = filePath;

    AggregateButton deleteButton = new AggregateButton(BUTTON_TXT, TOOLTIP_TXT, HELP_BALLOON_TXT);
    deleteButton.addClickHandler(new ExecuteDelete());

    FlexTable layout = new FlexTable();

    HTML message = new HTML("Are you sure you want to delete this file?");
    layout.setWidget(0, 0, message);
    layout.setWidget(0, 1, deleteButton);
    layout.setWidget(0, 2, new ClosePopupButton(this));

    setWidget(layout);
  }
  @Override
  public void onClick(ClickEvent event) {
    super.onClick(event);

    PasswordTextBox password1 = popup.getPassword1();
    PasswordTextBox password2 = popup.getPassword2();
    UserSecurityInfo userInfo = popup.getUser();
    RealmSecurityInfo realmInfo = AggregateUI.getUI().getRealmInfo();

    String pw1 = password1.getText();
    String pw2 = password2.getText();
    if (pw1 == null || pw2 == null || pw1.length() == 0) {
      Window.alert("Password cannot be blank");
    } else if (pw1.equals(pw2)) {
      if (realmInfo == null || userInfo == null) {
        Window.alert("Unable to obtain required information from server");
      } else {
        CredentialsInfo credential;
        try {
          credential = CredentialsInfoBuilder.build(userInfo.getUsername(), realmInfo, pw1);
        } catch (NoSuchAlgorithmException e) {
          Window.alert("Unable to build credentials hash");
          return;
        }

        baseUrl = realmInfo.getChangeUserPasswordURL();

        // Construct a JSOP request
        String parameters = credential.getRequestParameters();
        String url = baseUrl + "?" + parameters + "&callback=";
        getJson(jsonRequestId++, url, this);
      }
    } else {
      Window.alert("The passwords do not match. Please retype the password.");
    }
  }