if ( state != UNDONE_STATE ) { event = new ElementDeletedEvent( container, oldElement ); retValue.add( new NotificationRecordTask( oldElement, event, container.getRoot( ) ) ); } else { event = new ElementDeletedEvent( container, newElement ); retValue.add( new NotificationRecordTask( newElement, event, container.getRoot( ) ) ); } if ( state == DONE_STATE ) event.setSender( sender );
	protected List getPostTasks( )	{		List retValue = new ArrayList( );		retValue.addAll( super.getPostTasks( ) );		if ( container instanceof TableItem || container instanceof TableGroup				|| container instanceof TableRow )		{			TableItem table = LayoutUtil.getTableContainer( container );			if ( table != null )				retValue.add( new LayoutActivityTask( module, table ) );		}		NotificationEvent event = null;		// send the event to the container, the container is the "target"		// element		event = getContainerEvent( );		retValue.add( new NotificationRecordTask( container, event ) );		// If the content was added, then send an element added		// event to the content.		if ( state != UNDONE_STATE )		{			if ( isSelector( newElement ) )				retValue.add( new NotificationRecordTask( newElement, event,						container.getRoot( ) ) );		}		else		{			if ( isSelector( oldElement ) )				retValue.add( new NotificationRecordTask( oldElement, event,						container.getRoot( ) ) );		}		// Broadcast to the old element of the replace event.		if ( state != UNDONE_STATE )		{			event = new ElementDeletedEvent( container, oldElement );			retValue.add( new NotificationRecordTask( oldElement, event,					container.getRoot( ) ) );		}		else		{			event = new ElementDeletedEvent( container, newElement );			retValue.add( new NotificationRecordTask( newElement, event,					container.getRoot( ) ) );		}		if ( state == DONE_STATE )			event.setSender( sender );		return retValue;	}