Question

How i can do that kind of table using p:dataTable primefaces showcase. I want that column name and row name be steady always, only data in table can be changed.

My table picture:

enter image description here

Was it helpful?

Solution

For example here is simple dataTable code. You can adjust style in CSS or style argument, if you want grey headers.

<p:dataTable id="dataTable" var="car" value="#{tableBean.carsSmall}">

<p:column style="background-color: grey">
   <h:outputLabel>row name</h:outputLabel>
</p:column>

  <p:column headerText="column name">  
  </p:column>

<p:column headerText="column name">  
  </p:column>

<p:column headerText="column name">  
  </p:column>
 </p:dataTable>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top