code: public void addNewAttributeValue(String value) {
  
          // make sure not to add more values than allowed
          int maxOccurrence = getEntityType().getAttributeMaxOccurrence(m_attributeName);
          CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
          boolean mayHaveMore = ((attribute == null) || (attribute.getValueCount() < maxOccurrence));
          if (mayHaveMore && getAttributeType().isSimpleType()) {
              I_CmsFormEditWidget widget = m_widgetService.getAttributeFormWidget(m_attributeName);
              m_entity.addAttributeValue(m_attributeName, value);
              int valueCount = m_entity.getAttribute(m_attributeName).getValueCount();
              String defaultValue = m_widgetService.getDefaultAttributeValue(
                  m_attributeName,
                  getSimplePath(valueCount - 1));
              CmsAttributeValueView valueView = null;
              if ((m_attributeValueViews.size() == 1) && !m_attributeValueViews.get(0).hasValue()) {
                  valueView = m_attributeValueViews.get(0);
                  valueView.setActive();
                  // setActive may have reset the value, so we set it again
                  m_entity.setAttributeValue(m_attributeName, value, valueCount - 1);
                  valueView.getValueWidget().setValue(value);
              } else {
                  valueView = new CmsAttributeValueView(
                      this,
                      m_widgetService.getAttributeLabel(m_attributeName),
                      m_widgetService.getAttributeHelp(m_attributeName));
                  if (m_widgetService.isDisplaySingleLine(m_attributeName)) {
                      valueView.setCompactMode(CmsAttributeValueView.COMPACT_MODE_SINGLE_LINE);
                  }
                  ((FlowPanel)m_attributeValueViews.get(0).getParent()).add(valueView);
                  valueView.setValueWidget(widget, value, defaultValue, true);
              }
              CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
              if (handler.isIntitalized()) {
                  handler.addChange(
                      m_entity.getId(),
                      m_attributeName,
                      m_entity.getAttribute(m_attributeName).getValueCount() - 1,
                      ChangeType.add);
              }
              updateButtonVisisbility();
          }
      }
docs: Adds a new attribute value and adds the required widgets to the editor DOM.<p>
  
  @param value the simple value