• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting selected node of a rich:tree dynamically

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way to set selected node of a rich tree dynamically based on a action event??
I have a boolean checkbox enclosed within a tree node and i need to set selected tree node based on checkbox selection. I tried using advisenodeselected but that didnt give correct functionality. I tried triggering click event on tree on checkbox selection and tried to set advicenodeselected on tree click. But the problem I am facing is the node above or below the desired node is getting selected. From what I understand is that the method binding to advisenodeselected executes once for each node and based on return value the node is selected.
But for the click the method is called number of nodes+1 times. I am thinking that the tree needs to deselect the selected node before selecting a new node. But the problem I am facing is the for the tree click the method is executing number of nodes times some times and +1 some time leading to the above or below node the desired node to be selected.
Please explain the reason behind this

Thanks
Zeddicus
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, you can have multiple nodes open at the same time.

What you need is to provide the "node displayed" method on the server and let it instruct the client whether a given node is open or not. It gets called for each node that might display itself or its children.
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic