2

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.

Community
  • 1
  • 1
AlexLezama
  • 137
  • 1
  • 2
  • 8

2 Answers2

2

Maybe this is what you are looking for:

<f:facet name="header">
  Row Header Example
</f:facet>

Here is the complete example: Primefaces showcase - DataTable - Group 1

I think you want something like a horizontal header, a don't think primefaces has it, but you can change the style of first cell like this:

<p:column headerText="Id"> 
    <h:outputText value="#{car.id}" styleClass="someCssClass" /> 
</p:column> 
Claudinei
  • 305
  • 1
  • 6
  • 17
  • Thx for your quick reply but it isn't what im looking for, why dont you check the examples on my question above? – AlexLezama May 26 '14 at 18:54
  • What's wrong with what @Claudinei posted? It does exactly what you need: an header. What are you trying to achieve? – Simon Arsenault May 26 '14 at 22:31
  • As I said i need a row header not a column one. – AlexLezama May 27 '14 at 05:06
  • I think there are no row headers. Headers are always on top of something, so the solution @Claudinei suggested is exactly identical to the pictures you provided. Or am I wrong? – LarsBauer May 27 '14 at 06:09
  • @Alex I think you want some like a horizontal header, a don't think primefaces has it, but you can change the style of first cell. – Claudinei May 27 '14 at 11:32
-1

The h:column tag has a property called rowHeader that does what you need.

Ant Waters
  • 510
  • 1
  • 5
  • 22