How to display textlist field values on new lines in xpages?

I am stumped. how do i make the values in a text list field display with each entry in the text list on it’s own line. This is for an Xpage in read mode. Thanks.

Subject: RE: How to display textlist field values on new lines in xpages?

You’ll probably find quite a few suggestions for how to handle this in the forum or on the web. Here’s how I’ve handled it. I use one field for EDIT mode, and one for READ mode. There is some weirdness with multiline edit box wrapping in edit mode where the lines will wrap in weird (non-line-break) places. To get around that I use a custom converter and use the 2 fields:

Edit mode:

<xp:inputTextarea value=“#{newProductDoc.Purpose}” id=“purpose1” rendered=“#{javascript:newProductDoc.isEditable();}” tabindex=“12”>

xp:this.converter

<xp:customConverter>

<xp:this.getAsObject><![CDATA[#{javascript:@Explode(value,"\n");}]]></xp:this.getAsObject>

<xp:this.getAsString><![CDATA[#{javascript:@Implode(value,"\n");}]]></xp:this.getAsString>

 </xp:customConverter>

</xp:this.converter>

<xp:this.style><![CDATA[width:98%;height:#{javascript:doc = newProductDoc.getDocument(); 

@Count(doc.getItemValue(“Purpose”))+4;}em]]></xp:this.style>

</xp:inputTextarea>

Read mode:

<xp:text escape=“false” id=“cfPurpose” rendered=“#{javascript:!newProductDoc.isEditable();}”>

xp:this.value<![CDATA[${javascript:doc = newProductDoc.getDocument();

@Implode(doc.getItemValue(“Purpose”),“
”);}]]></xp:this.value>

</xp:text>

Of course, if you just have a multi-value field with short (non-wrapping) values, then you could probably get away with just using the Edit mode option for all modes.