Your Development & Design Resource
VIDEO: NotesDocument Auto-Save Teaser
08/22/2009 10:22 AM by Chris Toohey
While I'm still playing around with the demo of my NotesDocument Auto-Save engine - which I'm developing specifically for an article in the IBM Lotus Domino Designer Wiki - I thought that I would at least show an in-progress teaser demo.
The idea here is simple: The Auto-Save runs - in this example, every 5 seconds - and saves the UI Form's contents to a temp NotesDocument via HTTP POST over AJAX. For the initial submission - which creates a new temp NotesDocument - said NotesDocument UniversalID is returned and put into a field (which I would typically set to hidden). All subsequent auto-saves use that UNID value as the POST target.
When/if you finally submit, you're actually editing the temp NotesDocument and submitting it to the NotesDatabase as a document.
The idea here is that workflow and application logic may be tied to the document, so we keep it a temp NotesDocument until it's submitted. A simple clean-up Agent can be setup to purge any temp NotesDocuments that were not submitted... and you now have your simple-yet-fully-functional NotesDocument Auto-Save engine!
FYI: All NotesDocument reads and writes are done via the Domino CRUD API!