Abbreviate filenames in fileDownload control

<xp:fileDownload rows="30"
	id="fileDownloadControl" displayLastModified="false"
	value="#{myDoc.attachmentField}" hideWhen="true"
	displayCreated="false" displaySize="false" displayType="false"
	allowDelete="true" style="width:100%" 
		var fileName = fileVariable.getName();
		if (fileName.length > 25) {
			return @Left(fileName, 25)  + "...";
		} else {
			return fileName;
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...