我创建了一个<p:datatable>
并添加了一个列,该列在每一行中显示一个垃圾桶图标,我想通过单击垃圾桶图标来删除一行。
这是我的页面:
<p:column width="4%">
<p:outputLabel id="dragIcon" styleClass="ui-icon ui-icon-trash">
<p:ajax event="click" update="exploitTable" listener="#{bean.onDelete(item)}"/>
</p:outputLabel>
</p:column>
item是 的var
属性值<p:datatable>
。
但似乎没有调用onDelete方法。
有什么帮助吗?