Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6046409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:14:11+00:00 2026-05-23T07:14:11+00:00

I am displaying values from database table using h:datatable, one tupple is displaying in

  • 0

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>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:14:12+00:00Added an answer on May 23, 2026 at 7:14 am

    Either change your datamodel so that you have all tuple fields as a single entry of an one-dimensional List:

    List<List<String>> tuples = getItSomehow();
    List<String> fields = new ArrayList<String>();
    
    for (List<String> tuple : tuples) {
        fields.addAll(tuple);
    }
    

    and use it instead.

    <h:dataTable value="#{bean.fields}" var="field">
        <h:column>#{field}</h:column>
    </h:dataTable>
    

    Or, bring in the HTML <br/> element to put each tuple field in a separate line in a single column.

    <h:dataTable value="#{bean.tuples}" var="tuple">
        <h:column>#{tuple[0]}<br/>#{tuple[1]}<br/>#{tuple[2]}</h:column>
    </h:dataTable>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am retrieving values from a database and displaying it a table using php.
I am trying to display from a MySQL Database using PHP and Ajax but
I want to display data in my own format from Mysql database connecting through
I have a table displaying results from a database, and I am adding some
I want to take the values from this site for the country table in
I have a web page and using php Im quering a database and displaying
When displaying my DateTime values, I want them to be formatted like so: February
I am displaying a scrolled data table in a web page. This table has
So I got SQLite database working for my app. It loads text values from
I am trying to retrieve some rows from the database using simple SELECT statement

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.