All blog posts, code samples and downloads licensed under Apache License 2.0.
Close

Computed when composed like field binding

Oliver Busse on 02/11/2013 21:21:09 CET, filed under XSP 

Use this to compute a value for a field only when you create a new document.

The code must be placed within the dominoDocument container of the data-section of the page.
<xp:this.data>
	<xp:dominoDocument var="doc" formName="yourForm" action="openDocument">
		<xp:this.postNewDocument>
			<xp:actionGroup>
				<xp:setValue binding="#{doc.ID}" value="#{javascript:session.evaluate('@Unique')}">
				</xp:setValue>
			</xp:actionGroup>
		</xp:this.postNewDocument>
	</xp:dominoDocument>
</xp:this.data>

Tagged with computed field computed when composed