on 02-18-2011 11:49 AM
Hi,
I have a iBrowser Tree running on my IRPT page which is a multi-level tree structure.
On click of a node, i need to check whether is there any child node available for the selected node or not.
Is there any method to check that.
Regards
Muzammil
Hi,
Probably there is or probably there isin't , I am not too sure but if you look at an iBrowser tree the expansion or + sign would be visible only if there are child nodes , correct?
So what is your requirement that you need to check for child nodes?
Thanks
Udayan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Underlying the iBrowser tree is an xml document. There are several xPath expressions which could work (count, boolean, probably several other ways) to return the information you request.
But I guess the real question is what is the business reason for needing this information. Do you need it built into the underlying xml structure?
Regards,
Mike
Udayan/Mike,
The requirement is to add, update, delete records from/to the existing Tree.
I should only delete a node, if it is a child node. I cannot delete a parent node.
So before deleting, i need to check whether the selected node contains siblings or not.
Regards
Muzammil
Edited by: Muzammil Ahamed on Feb 18, 2011 6:38 PM
Assuming you're either using the SelectionEvent or a button, the results of
document.iBrowser.getBrowserObject().getSelectedPath();
will give you the full path of the selected node in the tree.
Simply use javascript and indxOf (http://www.w3schools.com/jsref/jsref_IndexOf.asp) to know if a forward slash (/) exists - one or more would indicate the level in the tree, and no slashes would mean root folder.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeremy,
Yes, i am calling this method on SelectionEvent.
I tried using getSelectedPath(). But it will only fetch till the record which i selected. There is no Forward Slash (/) after the name of the node. For example, Parent1/Sibling1/Sibling2. But i have a sibling3 which is a child node for sibling2. I am not able to track that.
I also tried getFolderClosedImage(). It is not returning any value. I think we need to load new image in iBrowser Applet.
Regards
Muzammil
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.