Well, I've been looking for any examples but all I could find was just examples in plain Java but I need to do something like this one or this other but in a JSF or PrimeFaces component.
The h:column
tag has a property called rowHeader
that does what you need.