FileDropper loses elements if navigation is occuring

0
Hi there!   I'm using FileDropper in a Wizard step. This wizard has Previous and Next buttons for navigation. If a user adds files to the FileDropper widget and navigate using Prev or Next buttons, then comes back to the Attachments step of the wizard, all of the added files are gone from the UI, but not from the backend. If I add a DataGrid 2 widget to show the files, the list contains everything that was previously uploaded using the dropper. Is there a possibility to fix this? If a user accidentally uploads a file, he/she has to use the DataGrid 2 to delete the attachment, which is not a UX friendly solution During the file attaching: (The upper part of the screenshot is the DataGrid 2) AAfter navigating:
asked
1 answers
0

Hi Roland,

 

To fix the issue in Mendix where uploaded files do not persist in the FileDropper widget when navigating between wizard steps, you need to ensure proper data association and persistence. First, create a FileDocument entity in your domain model if it is not already available. Then, establish an association between this entity and the object used in your wizard, naming it something like Wizard_Attachment. Set the FileDropper’s data source to retrieve files from the FileDocument entity through this association, ensuring that the files remain visible even after navigating away. Additionally, configure the FileDropper’s On Upload event to associate the uploaded file with the Wizard_Attachment entity. To finalize the process, use a microflow or nanoflow to commit the file after upload, ensuring its persistence throughout the wizard flow.

 

 

answered