code: public void removeAttributeValueFromEntity(int valueIndex) {
  
          CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
          if (attribute.isSingleValue()) {
              if (attribute.isComplexValue()) {
                  removeHandlers(0);
              }
              m_entity.removeAttribute(m_attributeName);
          } else {
              if (attribute.isComplexValue()) {
                  removeHandlers(valueIndex);
                  CmsEntity value = attribute.getComplexValues().get(valueIndex);
                  m_entity.removeAttributeValue(m_attributeName, valueIndex);
                  m_entityBackEnd.removeEntity(value.getId());
              } else {
                  m_entity.removeAttributeValue(m_attributeName, valueIndex);
              }
          }
      }
docs: Removes the attribute value with the given index.<p>
  This will not execute any DOM manipulations.<p>
  
  @param valueIndex the index of the attribute value to remove