Very simple dialog. I want a method to be called when it is closed by clicking on the x. However the listener is not called. It's not in the generated source code either. I'm using Primefaces 2.1 with Glassfish4.
xhtml:
<h:body>
<p:dialog visible="true" closeListener="#{variances.closeDetail}" >
Hi there!
</p:dialog>
</h:body>
java:
@Named("variances")
@SessionScoped
public class Variances implements Serializable {
public void closeDetail(CloseEvent event) {
Log.trace("Variances", "closeDetail called");
}
}
generated source:
<script type="text/javascript">
jQuery(function() {
widget_j_idt6 = new PrimeFaces.widget.Dialog(
'j_idt6',
{autoOpen:true,minHeight:0,ajaxClose:true,url:'/MetricsMonitor/binh.jsf'});});
</script>
Any idea ? I can't use p:ajax because I then get the "Parent not an instance of ClientBehaviorHolder" error.
TIA. Binh