在p:rowEditor中调用自定义侦听器以取消 [英] call a custom listener for cancel in p:rowEditor
问题描述
当我在primefaces rowEditor组件中单击取消"按钮时,我一直试图调用自定义侦听器.但是我无法找到正确的属性来执行此操作.
I have been trying to call a custom listener when the cancel button is clicked in the primefaces rowEditor component. But I am not able to find the correct attribute to do this.
取消"按钮的问题是,如果该行已经存在于dataTable中,则它可以正常工作,如果我尝试向dataTable动态添加新行并单击取消"按钮[如果我认为不是的话必填],则应删除空行,然后在dataTable中显示该空行.
The problem with the cancel button is that it works fine when the row is already present in the dataTable, if I try to add a new row dynamically to the dataTable and click on the cancel button [ if I think that it is not required ], the empty row is shown in the dataTable, when the empty row should be deleted.
请您帮帮我吗?
推荐答案
尝试使用(JSF2 + Primefaces 2.2.1)...
Try like (JSF2 + Primefaces 2.2.1) ...
<p:column headerText="Test">
<p:rowEditor>
<p:ajaxStatus oncomplete="#{yourBean.yourHandleMethod()}"></p:ajaxStatus>
</p:rowEditor>
</p:column>
这篇关于在p:rowEditor中调用自定义侦听器以取消的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!