xpages view panel column multivalue separator

大城市里の小女人 提交于 2019-12-20 02:34:58

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!