I have been working with setting up ContextMenu's for specific node types on the Primefaces 3.0 Tree. That works well, but is there any way to get which specific node was clicked to show the menu? Right mouse clicking doesn't fire the selection event. Is there a onMouseOver event or something that will let me tell which specific node the menu was opened on? I have an IDE-like tree with projects that contain documents of different types. I would like to know which project or which document was right-clicked to produce the menu.
Thanks.
TreeNode ContextMenu
-
- Posts: 4
- Joined: 11 Aug 2011, 09:48
I am facing the same problem,is there anyway to detect which node in the tree was right clicked ?
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
There is onNodeClick on the client side passing you the node element container as a jQuery object.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Hmm... But onNodeClick doesn't get business data from Java model (I think only toString() on TreeNode is called and passed to onNodeClick). And you set this issue http://code.google.com/p/primefaces/iss ... ail?id=856 to "Won'tFix". How can we get some data from Java model in order to distinguish between clicked nodes?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Posts: 4
- Joined: 11 Aug 2011, 09:48
its a great work i ve downloaded "primefaces-3.0.M3-SNAPSHOT.jar" from repository and used it to run the tree with context menu using same example in PrimeFaces Labs.so when i delete node for the 1st time, it works just fine but when i try to delete node for the 2nd time it doesn't work and there is a javascript error
"Error: id.replace is not a function
Source File: http://localhost:8080/Facelet/javax.fac ... 3-SNAPSHOT
Line: 4"
so any help in that ?
"Error: id.replace is not a function
Source File: http://localhost:8080/Facelet/javax.fac ... 3-SNAPSHOT
Line: 4"
so any help in that ?
-
- Information
-
Who is online
Users browsing this forum: Google [Bot] and 41 guests