As a long term Notes user and developer you know about soft deletions. In fact it's a feature we use on a daily basis when working in our mail file. Documents removed are not really removed but they will after a certain amount of time (48h is the default value).
You setup soft deletions in the database properties.
To see the "deleted" documents you should create a view of type "shared, contains deleted documents" which will give you a normal view from where can also open a deleted document in the client. You also have a new context menu action called "Restore" to even restore it from this area. You can also use formulas in actions to accomplish this.
So far so good
When working with XPages enabled applications you have to create that view, too - and the XPage which holds the view panel for it. But when you open the document with the XPage that corresponds to it you may run into trouble as you might just get an error which basically says: "Could not open the document - invalid universal ID".
I posted this question in the XPages slack channel and Jesse Gallagher spotted me the solution for that: you have to enable the handling with deleted documents in the data source of your XPage with the property "allowDeletedDocs".
As simple as that!