I am displaying values from database table using h:datatable, one tupple is displaying in one row of jsf page but i want to display every field in seperate row of jsf page. How can i achieve this?
Thanks in advance.
I am having the following code in jsf page.
<h:dataTable value="#{tableBean.pc}" var="p">
<h:column>
<h:graphicImage value="/resources/images/#{p.pimagename}" />
</h:column>
<h:column>
<h:outputText value="#{p.pname}" />
</h:column>
<h:column>
<h:outputText value="#{p.pprice}" />
</h:column>
<h:column>
<h:outputText value="#{p.pqtyavail}" />
</h:column>
</h:dataTable>
Either change your datamodel so that you have all tuple fields as a single entry of an one-dimensional
List:and use it instead.
Or, bring in the HTML
<br/>element to put each tuple field in a separate line in a single column.