Deleting attachment from PDF sidebar and reflect UI changes (AEM designer 6.5 - formely livecycle)
When adding attachments via a user interface:
Add button Click event below:
var myDoc = event.target;
var sFile = "myFile" + NumericField1.rawValue;
myDoc.importDataObject({cName: sFile});
var myDataObject = myDoc.getDataObject(sFile);
var sFileName = myDataObject.path;
ListBox1.addItem(sFileName,sFile);

the files are added and you can see them in the side bar. if I remove files from the UI it goes away from the sidebar.
QUESTION:
what is the event that triggers the removal of a file from a sidebar?

I can see the form brings a pop up alert but after i say "yes" it goes away from the sidebar and that is correct. I need to be able to capture that event so that i can deleted from the list on the UI

I assume that this event should exist so that i can catch it in the javascript code of the form and manipulate the UI accordingly. right?
thank you 🙂