Summary link to open current document in Data View

<xp:this.facets>
	<xp:div xp:key="summary">
		<xp:link id="link1" escape="false">
			<xp:this.value><![CDATA[/$$OpenDominoDocument.xsp?documentId=#{javascript:entry.getNoteID()}&action=openDocument]]></xp:this.value>
			<xp:this.text><![CDATA[<h4>#{entry.FirstName} #{entry.LastName}</h4>]]></xp:this.text>
		</xp:link>
	</xp:div>
</xp:this.facets>





Sometimes in a Data View you can get away with just adding a summaryColumn. But sometimes you want more complex content.

Assuming the Data View's var property is set to "entry", the above code will open the document in read mode in the XPage defined in the Form (second tab). The link text simulates the same look and feel as a summaryColumn.

XPages
Paul S Withers
February 13, 2014 11:42 AM
Rating
68

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...