Type 'org.primefaces.model.TreeNode' does not have type parameters

Viewed 113

When I'm trying the example of the Primefaces showcase, I faces this error:

Type 'org.primefaces.model.TreeNode' does not have type parameters

when trying to declare the treenode: private TreeNode<Document> root;

I know I can remove <Document> as error suggests, but how it worked in the showcase?

2 Answers

The type parameter for TreeNode was introduced in PrimeFaces 11. If you are getting that error, your PrimeFaces version is older than 11.

Always check what version the PrimeFaces showcase is using compared to your version and consult the migration guide to see what has changed.

Related