在ace:dataTable的每一行添加一个ace:对话框

时间:2018-06-09 20:15:56

标签: jsf icefaces-3

我有一个问题,我需要为ace的每一行添加一个删除按钮:datatable。点击它将显示ace:对话框或ace:confirmationDialog。

根据文档http://www.icesoft.org/wiki/display/ICE/ConfirmationDialog,它展示了如何创建一个独立的例子。哪个有用。

<h:commandButton id="show" value="Show Confirmation Dialog" onclick="ice.ace.instance('myDialog').show();" type="button"/>

<ace:dialog id="myDialog"
            header="A sample dialog overview example"
            width="400">

但是当我把它放在数据表的ace:列中时,ids就搞砸了。我添加了像这样的id的rowIndex,

    <ace:column>
    <h:commandButton id="deleteRowButton#{pendingUserTable.rowIndex}" value="Delete" 
onclick="ice.ace.instance('deleteRow'#{pendingUserTable.rowIndex}).show();" type="button"/>

    <ace:dialog id="deleteRow#{pendingUserTable.rowIndex}"
                header="A sample dialog overview example"
                width="400">
    </ace:dialog>
</ace:column>

如果我像这样硬编码id,它适用于特定按钮

onclick="ice.ace.instance('pendingUserTable:pfTable1:2:deleteRow-1').show();

现在我不知道如何通过按下“ice.ace.instance”来正确传递对话框的id。不使用我目前的方法。有什么想法吗? :D谢谢!

0 个答案:

没有答案