@Override
  public final void initialize(final URL location, final ResourceBundle resources) {

    c =
        cgu.getContactFromGroup(
            Main.getDefaultGroup(),
            MainPresenter.getData()
                .get(
                    MainPresenter.getMainPresenterInstance()
                        .getMainTable()
                        .getSelectionModel()
                        .getSelectedIndex())
                .getId());
    setupGroups();
    try {
      setupTextFields();
    } catch (IOException e) {
      logger.log(Level.SEVERE, "Error loading image");
    }
  }
  /** @throws StringNotValidException a */
  public final void onBtnSaveClick() throws StringNotValidException {

    String firstName;
    String lastName;
    TableMain tm;

    try {
      firstName = StringUtils.defaultIfBlank(txtFirstName.getText(), "MusterName");
      lastName = StringUtils.defaultIfBlank(txtLastName.getText(), "MusterName");
      c.setFirstName(firstName);
      c.setLastName(lastName);

      // update table view with name only
      tm =
          MainPresenter.getData()
              .get(
                  MainPresenter.getMainPresenterInstance()
                      .getMainTable()
                      .getSelectionModel()
                      .getSelectedIndex());
      tm.setFirstName(firstName);
      tm.setLastName(lastName);

      // set rest of contact information
      c.setEmail(StringUtils.defaultIfBlank(txtEmail.getText(), "MusterEmail"));
      c.setPhoneNumber(StringUtils.defaultIfBlank(txtPhoneNumber.getText(), "MusterNummer"));
      if (contactImage != null) {
        c.setPhoto(contactImage);
      }
      c.getAddress().setZipCode(StringUtils.defaultString(txtZipCode.getText(), "12345"));
      c.getAddress().setStreet(StringUtils.defaultIfBlank(txtStreet.getText(), "MusterStraße"));
      c.getAddress().setCity(StringUtils.defaultIfBlank(txtCity.getText(), "MusterStadt"));
      c.getAddress().setCountry(StringUtils.defaultIfBlank(txtCountry.getText(), "MusterLand"));

      int housenumber = 0;

      if (!StringUtils.isNumeric(txtHouseNumber.getText()) || (txtHouseNumber.equals("0"))) {
        throw new HouseNumberNotValidException("Diese Hausnummer ist nicht erlaubt");
      }
      housenumber = Integer.parseInt(txtHouseNumber.getText());
      if (housenumber > 300) {
        throw new HouseNumberNotValidException(
            "Hausnummer zu groß: Maximal erlaubte Hausnummer '300'");
      }
      c.getAddress().setHouseNumber(housenumber);

      txtFirstName.clear();
      txtLastName.clear();
      txtBorn.clear();
      txtCity.clear();
      txtEmail.clear();
      txtHouseNumber.clear();
      txtZipCode.clear();
      txtPhoneNumber.clear();

      onBtnBackClick();
      logger.log(Level.INFO, "New Information saved:");

    } catch (Exception e) {
      logger.log(Level.SEVERE, e.getMessage());
    }
  }