Finding out when actionLink action is completed on the user side

g kuczera <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <CAFk86Vo4z-HNv4rzXWKb+HQ1XL43oCf7c=Ng2rsQTkXn=eBSdw@mail.gmail.com>
Hi everybody,
I have an actionLink, which action returns the pdf document from the
server. The document is dynamically generated, so it can take few seconds
to deliver it to the user. I want to prevent the user from clicking on the
actionLink multiple times. I can block it in java script after the click
event occurrs, but I don't know how to find out when to unblock it.

Is there a way to find out when the document is received by the user and
then unblock the actionLink? I found one possible solution, but it seems
like an overhead:
http://stackoverflow.com/questions/1106377/detect-when-browser-receives-file-download
Is there a more tapestry way to do it?

Here is the actionLink code:
                                    <t:actionLink
t:id="downloadDocumentAsPdf" context="document.document_id"
                                        target="_blank">
                                        ${message:download.document.as.pdf}
                                    </t:actionLink>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.