Ajax unselect event not working
Posted: 20 Sep 2011, 15:41
Hi! I'm updating the Primefaces lib from a previous Snapshot to Primefaces 3.0M3, and after adding the new libraries one of the application's component is not working anymore. This is a part of the XHTML page:
On the backing bean:
The select event works fine, but the displayUnSelect function is never fired. I'm using Glassfish 3.1 with NetBeans 7, Mojarra 2.1 (also tried with MyFaces) and Primefaces 3.0.M3. I also tried with the latest Snapshot and I had the same problem.
Code: Select all
<p:tree id="arbol" value="#{monitorBean.root}" var="node"
selectionMode="checkbox" selection="#{monitorBean.selectedNodes}">
<p:ajax event="select" listener="#{monitorBean.displayOnSelect}" update="data:table data:dataList"/>
<p:ajax event="unselect" listener="#{monitorBean.displayOnUnselect}" update="data:table data:dataList"/>
<p:treeNode>
<h:outputText value="#{node.nombre}" />
</p:treeNode>
</p:tree>
Code: Select all
public void displayOnSelect(NodeSelectEvent event) {
//TODO
System.out.println("Selected!");
}
public void displayOnUnselect(NodeUnselectEvent event) {
//TODO
System.out.println("Unselected!");
}