Tree: DeferredWidgets not rendered properly on Node other than root
See original GitHub issueDescribe the defect I am trying to create <p:tree> with <p:textEditor> inside each <p:treeNode>. The problem is that <p:textEditor> only renders correctly in the root of <p:treeView>. On the other hand, <p:inputText> renders correctly on every <p:treeNode>.
Reproducer primefaces-test.tar.gz
Environment:
- PF Version: 8.0 and 7.0
- JSF + Mojarra (2.2 and 2.3) and MyFaces (2.2 and 2.3)
- Affected browsers: All
To Reproduce Steps to reproduce the behavior:
- run test app
- expand child element of a tree
Expected behavior Every tree node should render p:textEditor elements properly. p:textEditor renders only on the root.
Example XHTML <h:form> <p:tree value=“#{testView.root}” var=“node”> <p:treeNode> <p:textEditor value=“#{node}” /> </p:treeNode> </p:tree> </h:form>
Example Bean
@Named
@ViewScoped
public class TestView implements Serializable {
TreeNode root;
@PostConstruct
public void init() {
root = new DefaultTreeNode("Root", null);
TreeNode node0 = new DefaultTreeNode("Node 0", root);
TreeNode node1 = new DefaultTreeNode("Node 1", root);
TreeNode node00 = new DefaultTreeNode("Node 0.0", node0);
TreeNode node01 = new DefaultTreeNode("Node 0.1", node0);
TreeNode node10 = new DefaultTreeNode("Node 1.0", node1);
node1.getChildren().add(new DefaultTreeNode("Node 1.1"));
node00.getChildren().add(new DefaultTreeNode("Node 0.0.0"));
node00.getChildren().add(new DefaultTreeNode("Node 0.0.1"));
node01.getChildren().add(new DefaultTreeNode("Node 0.1.0"));
node10.getChildren().add(new DefaultTreeNode("Node 1.0.0"));
root.getChildren().add(new DefaultTreeNode("Node 2"));
}
public TreeNode getRoot() {
return root;
}
public void setRoot(TreeNode root) {
this.root = root;
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (10 by maintainers)
Top Results From Across the Web
jsTree not rendering list properly? - Stack Overflow
The list displays normally, just regular HTML, not as a tree like it should. There are no errors in the console. The jsTree...
Read more >Check whether a binary tree is a full binary tree or not
If a binary tree node has left and right sub-trees, then it is a part of a full binary tree by definition. In...
Read more >PeopleTools 8.52: PeopleSoft Tree Manager
The root node is always expanded. Expand All. Click to expand all of the nodes on the tree, so that the entire tree...
Read more >Chapter 12 Trees
The ancestors/descendents of x other than x itself are its proper ancestors/descendents. If you pick some random node a in a tree T,...
Read more >Everything you need to know about tree data structures
Trees are well-known as a non-linear data structure. ... If this root node is connected by another node , the root is then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In my application I have a tree which nodes are composed of several components (inputText, several commandButton). This is working fine. I also have TextEditors in TabViews in a dataTable. I also plan to have TextEditors in TreeTables.
So I think it is a valid assumption to expect to have them work in a TreeView as well.
While this is definitely not working is this really a UI you are using with TextEditors in every Node of a treeview?