I want to translate this html table to JSF table
<table border="1"> <tr> <td>OS Verison</td> <td>Linux</td> </tr> <tr> <td>Installed packages</td> <td>30</td> </tr> <tr> <td>Free HDD Space</td> <td>30 GB</td> </tr> <tr> <td>Installed RAM</td> <td>2 GB</td> </tr> </table>
I found many examples on Google how to write a JSF table that retrieves data from a database as a list, but none of them shows how to create a table with two columns, as described above.
PS
How can I rewrite this code to achieve the same result?
<h:dataTable id="books" columnClasses="list-column-center, list-column-right, list-column-center, list-column-right" headerClass="list-header" rowClasses="list-row" styleClass="list- background" value="#{DashboardController.getDashboardList()}" var="store"> <h:column> <h:outputText value="Session Timeout"/> <h:outputText value="Maximum Logged Users"/> </h:column> <h:column> <h:outputText value="#{store.sessionTTL} minutes"/> <h:outputText value="#{store.maxActiveUsers}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="one"/> </f:facet> </h:column> <h:column> <f:facet name="header"> <h:outputText value="two"/> </f:facet> </h:column> </h:dataTable>
I want to show in the main way, like the first table, the contents of a database table in which there are 2 columns with one row.
source share