code: private void onClickAdd() {
  
          if (m_currentLocation.isPresent()) {
              CmsFavoriteEntry entry = m_currentLocation.get();
              List<CmsFavoriteEntry> entries = getEntries();
              entries.add(entry);
              try {
                  m_favDao.saveFavorites(entries);
              } catch (Exception e) {
                  CmsErrorDialog.showErrorDialog(e);
              }
              m_context.close();
          }
      }
docs: The click handler for the add button.