work in progress, trying to keep the ID of the document, allowing the user to change all other properties.
also new documents get an ID. the server returns the ID of the newly inserted document. the clinet receives the ID and stores it in a hidden input. at this point the new document goes as a retrieved one.