wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/AbstractHtml.java
public boolean removeChild(final AbstractHtml child) {

        boolean listenerInvoked = false;
        final Lock lock = sharedObject.getLock(ACCESS_OBJECT).writeLock();
        boolean removed = false;
        try {
            lock.lock();

            removed = children.remove(child);

            if (removed) {

                // making child.parent = null inside the below method.
                initNewSharedObjectInAllNestedTagsAndSetSuperParentNull(child);

                final ChildTagRemoveListener listener = sharedObject
                        .getChildTagRemoveListener(ACCESS_OBJECT);

                if (listener != null) {
                    listener.childRemoved(
                            new ChildTagRemoveListener.Event(this, child));
                    listenerInvoked = true;
                }

            }

        } finally {
            lock.unlock();
        }
        if (listenerInvoked) {
            final PushQueue pushQueue = sharedObject
                    .getPushQueue(ACCESS_OBJECT);
            if (pushQueue != null) {
                pushQueue.push();
            }
        }
        return removed;
    }
public boolean removeChild(final AbstractHtml child) {

        boolean listenerInvoked = false;
        final Lock lock = sharedObject.getLock(ACCESS_OBJECT).writeLock();
        boolean removed = false;
        try {
            lock.lock();

            removed = children.remove(child);

            if (removed) {

                // making child.parent = null inside the below method.
                initNewSharedObjectInAllNestedTagsAndSetSuperParentNull(child);

                final ChildTagRemoveListener listener = sharedObject
                        .getChildTagRemoveListener(ACCESS_OBJECT);

                if (listener != null) {
                    listener.childRemoved(
                            new ChildTagRemoveListener.Event(this, child));
                    listenerInvoked = true;
                }

            }

        } finally {
            lock.unlock();
        }
        if (listenerInvoked) {
            final PushQueue pushQueue = sharedObject
                    .getPushQueue(ACCESS_OBJECT);
            if (pushQueue != null) {
                pushQueue.push();
            }
        }
        return removed;
    }
Removes the given tag from its children only if the given tag is a child
of this tag.

@param child
the tag to remove from its children
@return true if removed
@author WFF