I'm sorry if this is really off base but,
DocumentData data = store.getDocumentData("1");
that looks pretty static to me as to which document is going to get returned. The documentStore is a conversation scoped component. So unless each link is in a brand new conversation then the I fail to see how using getDocumentData(
1) is going to work.
Hmm, been reading the code of DocumentStore a bit more. Can you post the code where you put the document into the store? Are you always doing store.saveData(
1, document) ? If you are doing this then I'm not really sure. I can't see the documentStore doing anything fancy.
Maybe try remotely debugging and see if your document is actually getting stored in the DocumentStore?