code: Widget createWidget() {
  
          if (isTrue(m_jsonConfig, CmsDataViewConstants.CONFIG_PREVIEW)) {
              return new CmsDataViewPreviewWidget(
                  m_config,
                  m_valueAccessor,
                  new CmsDataViewPreviewWidget.ContentImageLoader());
          } else {
              I_ImageProvider provider = null;
              CmsDataViewValue val = m_valueAccessor.getValue();
              JSONValue iconVal = m_jsonConfig.get(CmsDataViewConstants.CONFIG_ICON);
              if ((iconVal != null) && (iconVal.isString() != null)) {
                  provider = new CmsDataViewPreviewWidget.SimpleImageLoader(iconVal.isString().stringValue());
              }
              return new CmsDataViewPreviewWidget(m_config, m_valueAccessor, provider);
          }
  
      }
docs: Creates the correct widget based on the configuration.<p>
  
  @return the new widget