View 中有一个列具有多值分隔符作为新行。
但是当我将此 View 拖放到我的 XPage 中时(作为 <xp:viewpanel>
),多个值显示在 ,
中而不是在不同的行。
我在 View 列中找不到任何属性。我怎样才能做到这一点?
提前致谢。
最佳答案
您必须在此处使用 customConverter。因为 convertList 只接受一个字符作为分隔符。
<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>
我们正在通过 <br/>
打破值(value)观字符串并提供内容类型,因此它不会转义 html 输出。
关于xpages View 面板列多值分隔符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24934656/