问题
There is a column from a view which have the multi-value separator the new line.

But when I drag and drop this view inside my XPage ( as a <xp:viewpanel>
) the multiple values are display within ,
and not in different lines.
I couldn't find any property in the view column. How can I achive this?
Thanks in advance.
回答1:
You have to use customConverter here. Because convertList takes only one character as the seperator.
<xp:viewColumn
columnName="SomeColumn"
id="viewColumn1"
contentType="html">
<xp:this.converter>
<xp:customConverter getAsObject="#{javascript:return value;}">
<xp:this.getAsString>
<![CDATA[#{javascript:return @Implode(value, "<br/>")}]]>
</xp:this.getAsString>
</xp:customConverter>
</xp:this.converter>
<xp:viewColumnHeader
value="Header"
id="viewColumnHeader1">
</xp:viewColumnHeader>
</xp:viewColumn>
We are imploding values by <br/>
string and providing content type so it won't escape the html output.
来源:https://stackoverflow.com/questions/24934656/xpages-view-panel-column-multivalue-separator