p:tree, unselect, bug or that's the way it should work?

UI Components for JSF
Post Reply
3man
Posts: 99
Joined: 16 Jun 2011, 16:13

23 Dec 2011, 10:45

Code: Select all

<h:form id="form">  
    <p:tree value="#{treeBean.root}" var="node" dynamic="true" cache="false"  
            selectionMode="checkbox"  selection="#{treeBean.selectedNode}"  
  
        <p:ajax event="select" listener="#{treeBean.onNodeSelect}" />  
        <p:ajax event="unselect" listener="#{treeBean.onNodeUnselect}" />  
  
        <p:treeNode>  
            <h:outputText value="#{node}" />  
        </p:treeNode>  
    </p:tree>  
  
</h:form> 
Problem:
onNodeSelect - work
onNodeUnselect - doesn't work !!!

Question:
Is it 'unselect' event supported for tree with selectionMode="checkbox"?
Last edited by 3man on 23 Dec 2011, 11:01, edited 1 time in total.
-----------
primefaces-3.3-SNAPSHOT
tomcat 7.0.22
Mojarra 2.1.1 (FCS 20110408)
NetBeans 7.1

cagatay.civici
Prime
Posts: 17996
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

23 Dec 2011, 10:53


kukeltje
Expert Member
Posts: 9179
Joined: 17 Jun 2010, 13:34
Location: Netherlands

23 Dec 2011, 10:54

Optimus is right and can you please use more descriptive subject next time
Ronald van Kuijk
______________________________
PrimeFaces 6.1, PrimeFaces plus 0.0.2 | JbossWildfly 10.1| Mojarra 2.2.13
Fedora 61, Firefox 'most recent'
Read the forum posting rules
Beginners: https://jsf.zeef.com/bauke.scholtz

3man
Posts: 99
Joined: 16 Jun 2011, 16:13

23 Dec 2011, 11:00

optimus.prime wrote:Maybe a search before posting?

viewtopic.php?f=3&t=16773&p=50997&hilit=unselect#p50997
this topic is about selectionMode="single", am I right?

I also try with metakey pressed .. with selectionMode="single" it is work, with selectionMode="checkbox" it doesn't.

Sorry about Subject, I change it ..
-----------
primefaces-3.3-SNAPSHOT
tomcat 7.0.22
Mojarra 2.1.1 (FCS 20110408)
NetBeans 7.1

3man
Posts: 99
Joined: 16 Jun 2011, 16:13

23 Dec 2011, 12:57

So, is it a bug, should I create issue?
-----------
primefaces-3.3-SNAPSHOT
tomcat 7.0.22
Mojarra 2.1.1 (FCS 20110408)
NetBeans 7.1

3man
Posts: 99
Joined: 16 Jun 2011, 16:13

23 Dec 2011, 13:32

I look response with firebug and I see that there is en error with with my code in bean actionevent metod

I use 'NodeSelectEvent'

Code: Select all

    public void onNodeUnselect(NodeSelectEvent event) {  ...   }
instead 'NodeUnselectEvent'

Code: Select all

    public void onNodeUnselect(NodeUnselectEvent event) {  ...   }
thanks anyway for quick response!
-----------
primefaces-3.3-SNAPSHOT
tomcat 7.0.22
Mojarra 2.1.1 (FCS 20110408)
NetBeans 7.1

KingdomHeart
Posts: 280
Joined: 25 Jun 2010, 01:18

23 Dec 2011, 16:54

the p:tree with selectionMode="checkbox" work for me. Sorry, but I dont think this is a bug. However I am using RC1, not sure about RC2. I do not see the RC2 jar file on the website

Mojarra 2.1.10, Glassfish 3.1, Tomcat 7, Primeface 3.3.1
IE 6-8, FireFox 10-13
MAC OSX Lion, Windows XP, 7

3man
Posts: 99
Joined: 16 Jun 2011, 16:13

23 Dec 2011, 18:04

@KingdomHeart
I already answered to this post ..

thanks anyway
3man wrote:I look response with firebug and I see that there is en error with with my code in bean actionevent metod

I use 'NodeSelectEvent'

Code: Select all

    public void onNodeUnselect(NodeSelectEvent event) {  ...   }
instead 'NodeUnselectEvent'

Code: Select all

    public void onNodeUnselect(NodeUnselectEvent event) {  ...   }
thanks anyway for quick response!
-----------
primefaces-3.3-SNAPSHOT
tomcat 7.0.22
Mojarra 2.1.1 (FCS 20110408)
NetBeans 7.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests