this is the code of my managedBean class. i have no-arg constructor, setters and getters. still i'm unable to find what is wrong with the code.
i have added the managed bean in the faces-config file as well
public class TreeBean {
private TreeNode root;
public void setRoot(TreeNode root) {
this.root = root;
}
<!--this is the no arg constructor.--!>
the setters and getters are also set accordingly.
public TreeBean() {
root = new DefaultTreeNode("Root", null);
TreeNode node0 = new DefaultTreeNode("Node 0", root);
}
public TreeNode getRoot() {
return root;
}
}
when i run the xhtml file i throws the error as Unable to create managed bean treeBean. The following problems were found: - Bean or property class TreeBean for managed bean treeBean cannot be found. what wrong have i done?
See Question&Answers more detail:os