在 xpages 中使用 Canonicalize

发布于 2025-01-16 04:43:32 字数 295 浏览 5 评论 0原文

我正在创建从 Lotus 数据库获取数据的只读 xpage。

这些字段中有些包含处理文档的用户的姓名,这些字段是多值的。

在我的 xpage 上,我插入了一个 MultilineEditBox,以便正确提取所有用户,我将其设置为 MultipleSeparator: @NewLine() ,以便它们进入头部。

但是,用户显示如下:

CN=Donald Duck/O=Duckburg

我希望只出现唐老鸭。

我发现 Canonicalize 可能对我有用,但我似乎无法应用它来使其发挥作用。

I am creating read-only xpages that take data from a Lotus database.

Among these fields are some that contain the names of the users who worked on the documents, the fields are multivalue.

On my xpage I have inserted a MultilineEditBox so that all users are correctly extracted, I put as MultipleSeparator: @NewLine() so that they go to head.

However the users are displayed like this:

CN=Donald Duck/O=Duckburg

I would like only Donald Duck to appear.

I found that Canonicalize might work for me, but I can't seem to apply it to make it work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

燕归巢 2025-01-23 04:43:32

Canonicalize = 您已有的格式。您寻求的是通用名称(CN),所以

@Name("[CN]", <YourfieldValues>)

应该可以。我猜您想使用别名定义值列表,以便显示值是 CN,但“真实”值采用规范化格式。

Canonicalize = the format you already have. What you seek is the Common Name (CN), so

@Name("[CN]", <YourfieldValues>)

should work. I guess you want to define your value list with aliases, so that the display value is CN but the "real" values are in canonicalized format.

做个ˇ局外人 2025-01-23 04:43:32

由于这是只读页面,因此您可以使用 xp:repeat 控件循环遍历字段中的值并根据需要设置它们的格式。这是您可以使用的示例:

<xp:repeat id="repeatNames" rows="999" value="#{document.fieldWithNames}" indexVar="index" var="personName" removeRepeat="true">
    <xp:text value="#{personName}" escape="true" disableTheme="true">
        <xp:this.converter>
            <xp:customConverter getAsObject="#{javascript:return value}">
                <xp:this.getAsString><![CDATA[#{javascript:return @Name("[CN]", value)}]]></xp:this.getAsString>
            </xp:customConverter>
        </xp:this.converter>
    </xp:text>
</xp:repeat>

Since this is a readonly page, you can use a xp:repeat control to loop over the values in the field and format them as needed. Here's an example that you can use:

<xp:repeat id="repeatNames" rows="999" value="#{document.fieldWithNames}" indexVar="index" var="personName" removeRepeat="true">
    <xp:text value="#{personName}" escape="true" disableTheme="true">
        <xp:this.converter>
            <xp:customConverter getAsObject="#{javascript:return value}">
                <xp:this.getAsString><![CDATA[#{javascript:return @Name("[CN]", value)}]]></xp:this.getAsString>
            </xp:customConverter>
        </xp:this.converter>
    </xp:text>
</xp:repeat>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文