code: public void prepareCommit() {
  
          if (m_baseCollection instanceof List) {
              List<?> list = (List<?>)m_baseCollection;
              list.clear();
          } else if (m_baseCollection instanceof SortedMap) {
              SortedMap<?, ?> map = (SortedMap<?, ?>)m_baseCollection;
              map.clear();
          }
      }
docs: Prepares this widget dialog parameter to be committed.<p>
  
  This is required if the base type is mapped to a Collection object,
  because the collection needs to be cleared before the new values are set.<p>