Xpages将可编辑的Combobox绑定到重复文档中的字段

时间:2017-05-03 08:16:33

标签: combobox xpages

我有一个绑定到文档(document1)的xpage。该文档包含两个字段HW_User和HW_UserAction,它们都是多值字段。第二个字段HW_UserAction中的值的数量将基于字段HW_User中的值的数量(在文档创建时计算)。

在Xpage上我想使用计算字段在重复控件中显示字段HW_User中的值。对于HW_User字段中的每个值,我还希望显示具有3个值的组合框,并将所选值存储在文档中的HW_UserAction字段中。 我尝试了多个版本,在同一个重复语句中使用组合框或单独使用组合框(参见下面的代码),但我无法在编辑模式下显示组合框(或dojo组合框)。任何提示或建议都非常感谢。

谢谢,罗杰

<xp:table>
    <xp:repeat id="repeat1" var="rowdata" indexVar="varindex" rows="30">
    <xp:this.value><![CDATA[#{javascript:document1.getItemValueArray("HW_User");}]]></xp:this.value>
    <xp:tr>
        <xp:td>
            <xp:text escape="true" id="computedField1">
            <xp:this.value><![CDATA[#{javascript:rowdata}]]></xp:this.value>
            </xp:text>
        </xp:td>
    </xp:tr>
    </xp:repeat>
</xp:table>

<xp:table>
    <xp:repeat id="repeat2" var="rowdataaction" indexVar="varindex2" rows="30" repeatControls="true">
    <xp:this.value><![CDATA[#{javascript:document1.getItemValueArray("HW_User_Action");}]]></xp:this.value>
    <xp:tr>
        <xp:td>
            <xe:djComboBox id="djComboBox__${varindex2}" multipleSeparator=";" defaultValue="Back to stock">
            <xp:this.value><![CDATA[#{javascript:rowdataaction}]]></xp:this.value>
            <xp:selectItem itemLabel="Back to stock"></xp:selectItem>
            <xp:selectItem itemLabel="Transfer"></xp:selectItem>
            </xe:djComboBox>
        </xp:td>
    </xp:tr>
    </xp:repeat>
</xp:table>

0 个答案:

没有答案
相关问题