DragAndDrop
The DragAndDrop
ViewTemplate provides a user interface component that allows users to either select files manually or drop them into a defined drop zone. Once a file is selected or dropped, a specific Action — configured via the dropAction
property — is automatically executed. Additionally, a textual description can be shown within the drop area using the descriptionField
property.
Usage Context
Example Implementation
An example of this ViewTemplate is Dropzone
, implemented in the UniversalFileProcessorDropzone_view
within the UniversalFileProcessor
Context.
Appearance in the Client
In the client, the DragAndDrop
ViewTemplate is, e.g., used in the Dashlet for importing emails:
Configuration
The DragAndDrop
ViewTemplate has a minimal configuration surface. Its functionality is primarily controlled via two properties:
descriptionField
This property references an EntityField that provides descriptive text displayed inside the drop area. In the example Dropzone
, this is the INFO
field of the UniversalFileProcessor_entity
.
dropAction
This property specifies the Action that will be triggered immediately after a file has been selected or dropped into the drop zone.
Make sure that the configured Action is capable of processing the file content as expected, including validation and storage routines if applicable.