public void removeAttributeValue(CmsAttributeValueView reference, boolean force) {

        CmsAttributeHandler parentHandler = null;
        CmsAttributeValueView parentView = null;
        boolean removeParent = false;

        CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
        if (isChoiceHandler() && attribute.isSingleValue()) {
            // removing last choice value, so remove choice itself
            parentHandler = (CmsAttributeHandler)m_parentHandler;
            parentView = reference.getParentView();
            removeParent = true;
        }

        if (attribute.isSingleValue() && !force) {

            reference.removeValue();
            if (!attribute.isSimpleValue()) {
                removeHandlers(0);
            }
            m_entity.removeAttribute(m_attributeName);
        } else {
            int index = reference.getValueIndex();
            if (attribute.isComplexValue()) {
                removeHandlers(index);
                CmsEntity value = attribute.getComplexValues().get(index);
                m_entity.removeAttributeValue(m_attributeName, index);
                m_entityBackEnd.removeEntity(value.getId());
            } else {
                m_entity.removeAttributeValue(m_attributeName, index);
            }
            reference.removeFromParent();
            m_attributeValueViews.remove(reference);

        }
        updateButtonVisisbility();
        if (removeParent && (parentHandler != null) && (parentView != null)) {
            parentHandler.removeAttributeValue(parentView);
            parentView.setCollapsed(false);
        }
        CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
        if (handler.isIntitalized()) {
            handler.addChange(m_entity.getId(), m_attributeName, 0, ChangeType.remove);
        }

    }
public void removeAttributeValue ( CmsAttributeValueView reference , boolean force ) { CmsAttributeHandler parentHandler = null ; CmsAttributeValueView parentView = null ; boolean removeParent = false ; CmsEntityAttribute attribute = m_entity . getAttribute ( m_attributeName ) ; if ( isChoiceHandler ( ) && attribute . isSingleValue ( ) ) { parentHandler = ( CmsAttributeHandler ) m_parentHandler ; parentView = reference . getParentView ( ) ; removeParent = true ; } if ( attribute . isSingleValue ( ) && ! force ) { reference . removeValue ( ) ; if ( ! attribute . isSimpleValue ( ) ) { removeHandlers ( 0 ) ; } m_entity . removeAttribute ( m_attributeName ) ; } else { int index = reference . getValueIndex ( ) ; if ( attribute . isComplexValue ( ) ) { removeHandlers ( index ) ; CmsEntity value = attribute . getComplexValues ( ) . get ( index ) ; m_entity . removeAttributeValue ( m_attributeName , index ) ; m_entityBackEnd . removeEntity ( value . getId ( ) ) ; } else { m_entity . removeAttributeValue ( m_attributeName , index ) ; } reference . removeFromParent ( ) ; m_attributeValueViews . remove ( reference ) ; } updateButtonVisisbility ( ) ; if ( removeParent && ( parentHandler != null ) && ( parentView != null ) ) { parentHandler . removeAttributeValue ( parentView ) ; parentView . setCollapsed ( false ) ; } CmsUndoRedoHandler handler = CmsUndoRedoHandler . getInstance ( ) ; if ( handler . isIntitalized ( ) ) { handler . addChange ( m_entity . getId ( ) , m_attributeName , 0 , ChangeType . remove ) ; } }
Removes the reference attribute value view.<p>

@param reference the reference view
@param force <code>true</code> if the widget should be removed even if it is the last one