your GWT version & Smart GWT version :
- GWT 2.4
- SmartGWT 2.5 and 3.0
whether you were in GWT Hosted / Development mode or a normal browser
- Development mode
browser version and operating system
- Firefox 11, Windows XP SP2
what you expected to happen, and, if applicable, the Smart GWT documentation
that led you to believe your approach would work
according to the javadoc of public void setPathDelim(String pathDelim)
The pathDelim can be any character or sequence of characters, but must be a unique string with respect to the text that can appear in the nameProperty that's used for naming the nodes. So for example, if you have the following tree:
This works as expected :
However, setting tree.setPathDelim("*//*"); or any other "sequence of characters" will cause the tree.find method to return null.
I have to change the default path delimiter because my tree can contain URLs.
Best Regards, and please let me know if this is not a bug and rather a misunderstanding of the javadoc.
- GWT 2.4
- SmartGWT 2.5 and 3.0
whether you were in GWT Hosted / Development mode or a normal browser
- Development mode
browser version and operating system
- Firefox 11, Windows XP SP2
what you expected to happen, and, if applicable, the Smart GWT documentation
that led you to believe your approach would work
according to the javadoc of public void setPathDelim(String pathDelim)
The pathDelim can be any character or sequence of characters, but must be a unique string with respect to the text that can appear in the nameProperty that's used for naming the nodes. So for example, if you have the following tree:
This works as expected :
Code:
final Tree tree = new Tree(); tree.setPathDelim("-"); TreeNode grandson = new TreeNode("1st grandson"); TreeNode son = new TreeNode("1st son", grandson); TreeNode brother = new TreeNode("2nd son"); TreeNode root = new TreeNode("rootValue", son, brother); tree.setRoot(root); IPickTreeItem picktree = new IPickTreeItem(); picktree.setValueTree(tree); picktree.setCanSelectParentItems(true); DynamicForm df = new DynamicForm(); df.setFields(picktree); df.draw(); picktree.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { TreeNode node = tree.find(event.getValue().toString()); GWT.log(node == null ? "Node is NULL" : "Node is not NULL"); } });
I have to change the default path delimiter because my tree can contain URLs.
Best Regards, and please let me know if this is not a bug and rather a misunderstanding of the javadoc.
Comment