That's what the docId sessionScope variable was for -
on the document xpage, you set the documentId to the docId you saved before, like so:
<xp:this.data>
<xp:dominoDocument var="document1" action="openDocument"
documentId="#{javascript:sessionScope.docId}">
</xp:dominoDocument>
</xp:this.data>