【问题标题】:checkBoxGroup: typeof return [Ljava.lang.StringcheckBoxGroup: typeof 返回 [Ljava.lang.String
【发布时间】:2019-02-21 16:02:25
【问题描述】:

我有以下 XPage、一个复选框组和一个计算域

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
    <xp:panel id="ref">
        <xp:checkBoxGroup id="checkBoxGroup1">
            <xp:selectItems>
                <xp:this.value><![CDATA[#{javascript:var val = ["Test1", "Test2"];
return val}]]></xp:this.value>
            </xp:selectItems>
            <xp:eventHandler event="onchange" submit="true"
                refreshMode="partial" refreshId="ref">
            </xp:eventHandler>
        </xp:checkBoxGroup>

        <xp:text escape="true" id="computedField3">
            <xp:this.value><![CDATA[#{javascript:typeof getComponent("checkBoxGroup1").getValue()}]]></xp:this.value>
        </xp:text>
        <xp:br></xp:br>
    </xp:panel>
</xp:view>

当我点击复选框时,我期望 computedField 返回一种数组,而不是返回 [Ljava.lang.String

如何更改我的代码,以便在我选择一个或多个复选框时,computedField 返回一种“数组”或“向量”

【问题讨论】:

    标签: javascript xpages typeof


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-09-23
      • 1970-01-01
      • 2014-09-22
      • 2011-09-23
      • 1970-01-01
      • 1970-01-01
      • 2011-05-22
      相关资源
      最近更新 更多