public void editContact(Contact contact) {
if (view.getViewPopup().isEditMode()) {
contact.setName(view.getViewPopup().getNameField().getValue().toString());
contactRepository.update(contact);
view.getViewPopup().disableEditMode();
eventBus.post(new ContactUpdatedEvent(contact, this));
} else {
view.getViewPopup().enableEditMode();
}
}