Brendan McKenzie

XPages File download control

Tuesday, 21 July 2009

I have encountered an issue with the file download control and reported it to IBM.

When accessing a document from another database and using the file download control (<xp:fileDownload>) I encounter 500 error if I try to download the file.

The URL generated by the control for the files are:


While I wait for IBM to respond with a solution, I am using the code below.

    <xp:this.rendered><![CDATA[#{javascript:var att = document1.getAttachmentList('field');return att != null && att.size() > 0;}]]></xp:this.rendered> 
            value="#{javascript:return document1.getAttachmentList('field');}" 
                <xp:text escape="false"> 
                    <xp:this.value><![CDATA[#{javascript:return '<a href="/database.nsf/' + document1.getDocument().getUniversalID() + '/$FILE/' + ent.getName() + '">' + ent.getName() + '</a>';}]]></xp:this.value> 

update (19/08/2009): 4 weeks later and still waiting for a response from IBM.