code: void onEndTypeChange() {
  
          EndType endType = m_model.getEndType();
          m_groupDuration.selectButton(getDurationButtonForType(endType));
          switch (endType) {
              case DATE:
              case TIMES:
                  m_durationPanel.setVisible(true);
                  m_seriesEndDate.setValue(m_model.getSeriesEndDate());
                  int occurrences = m_model.getOccurrences();
                  if (!m_occurrences.isFocused()) {
                      m_occurrences.setFormValueAsString(occurrences > 0 ? "" + occurrences : "");
                  }
                  break;
              default:
                  m_durationPanel.setVisible(false);
                  break;
          }
          updateExceptions();
      }
docs: Called when the end type is changed.