Displays documents attached to a specified task.



Basic Usage



Any content inside the <adf-task-attachment-list> element will be displayed when the list is empty:

<adf-task-attachment-list ...>
    <div><!-- Custom empty list message goes here --></div>


A default "no content" template is displayed if you don't supply one to override it:


Class members


NameTypeDefault valueDescription
disabledbooleanfalseDisable/Enable read only mode for attachment list.
taskIdstring(required) The ID of the task to display.


attachmentClickEventEmitter<any>Emitted when the attachment is double-clicked or a view option is selected from the context menu by the user from within the component. Returns a Blob representing the clicked object.
errorEventEmitter<any>Emitted when an error occurs while fetching the attachments.
successEventEmitter<any>Emitted when the attachment list has fetched all the attachments. Returns a list of attachments.


How to Add Drag and Drop Functionality

You can wrap the component with an Upload Drag Area component to enable the user to upload attachments for empty lists. When you do this, you can also pass a custom no content template as shown below. The component invites the user to drag files to upload whenever the list is empty.

            <div adf-empty-list-header>{{This List is empty}}</div>
            <div adf-empty-list-body>{{Drag and drop to upload}}</div>
            <div adf-empty-list-footer>
                <img [src]="Your custom image URL"></div> 
import { UploadService } from '@alfresco/adf-core';
import { TaskUploadService } from '@alfresco/adf-process-services';

Make sure you override the UploadService with the TaskUploadService

    selector: 'my-custom-task-attachment',
    providers: [
        { provide: UploadService, useClass: TaskUploadService }
class MyCustomTaskAttachmentComponent {
    constructor() {}

See also

© 2023 Alfresco Software, Inc. All Rights Reserved.