< Back

Document Subject: Show Mutivalue field in Xpages
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#xpages-multivalue or http://A555F9/nn.nsf/ByAlias/xpages-multivalue

if you map a domino field to an xpages field the data wil be displayed comma separated. There is no Display separate values with Newline option.




To display seperate values you need to use a repeat control.

I will assume you have created your data source.

This example will show the document history multivalue field docHistory in a collapsed section.

The code will then look like:

<xp:section id="section2" header="History" initClosed="true">
<xp:repeat id="repeat1" rows="30"
   value="#{document1.docHistory}" indexVar="index" var="history"
   first="1">
   <xp:label value="#{document1.docHistory[index]}" id="label1"></xp:label>
   <xp:br id="br1"></xp:br><!-- this line adds the mutivalue separator-->
  </xp:repeat>
</xp:section>

The simplest thing to do is copy the above code into an xpage and then change the variable name docHistory to your variable.

You can remove the lines that contain section if you do not want the collapsible section.

 

Here are a couple of youtube videos which may help you out if you want to know more about xpage repeat controls:

http://www.youtube.com/watch?v=AsOcc8WGwDA&feature=related

http://www.youtube.com/watch?v=blS_0LLWYUI