1
votes

The XPages file download control shows wrong created and modified date

I have an XPages application running on a Domino 8.5.3 FP6 Server and I have to deal with the following known bugs:

LO68445: XPAGE: IN FILE DOWNLOAD CONTROL, CREATED COLUMN SHOWS DOCUMENT CREATED DATE, MODIFIED COLUMN SHOWS DOCUMENT MODIFIED DATE

LO61249: CUSTOMER | THE FILE DOWNLOAD CONTROL DOESN'T DISPLAY THE DATE ST AMP OF THE FILE ATTACHED


Take a look at the following screenshots:

First Step: Upload attachment ("added on" date is correct, because upload was done after the document creation)...

enter image description here

Second Step: Reopen the same document (as you can see the "added on" date is the same as the creation date of the document and that's wrong)...

enter image description here


Thanks in advance for any solution, workaround or alternative!

1
I believe this is a known issue that is yet to be resolved. The IBM reference is LO61249 and you can find others out there, like this one, who have run in to the same issue. I believe your best solution is as you identified in your answer, to override the attribute and compute it yourself.Eric McCormick
@EricMcCormick: Thanks for your hintGeorg Kastenhofer

1 Answers

2
votes

SOLUTION (WORKAROUND):

After some investigations, I have found a possible workaround. The only thing you have to do is to override the createdValue attribute of the xp:fileDownload control:

<xp:fileDownload id="fileDownload" indexVar="fileIndex" var="fileData" 
    hideWhen="false" value="#{currentDocument.Body}" sizeTitle="Size" 
    fileNameTitle="Filename" createdTitle="Added on">
    <xp:this.createdValue><![CDATA[#{javascript: //workaround
    if (fileIndex == 0 && @Attachments() <= 1) return @AttachmentModifiedTimes();
    else return @AttachmentModifiedTimes()[fileIndex];}]]></xp:this.createdValue>
</xp:fileDownload>

Any further solutions, workarounds are welcome!