Obviously. After all, the RichFaces and PrimeFaces people did so!
However, creating custom JSF tags is not something to do just to while away an idle afternoon. And if you do create one, I'd recommend using the xhtml method over custom
Java code, as it's a lot simpler and less likely to break when JSF's next release comes out.
In short, if you attempt this, expect to spend a LOT of time and effort (== money, if you're doing it for business purposes). Not to mention the annoyance of having to drop everything and go fix bugs as they pop up.
Unless you're authoring your own alternative JSF tagset with commercial intent or simply want to muck around in JSF's darker levels, it would be far more productive to simply use an existing pre-debugged tree control. You'll spend quite enough time on that, I can attest from experience.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.