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 6743399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:57:23+00:00 2026-05-26T11:57:23+00:00

I have to display a two dimensional table with a great number of columns

  • 0

I have to display a two dimensional table with a great number of columns and rows and the two dimensions are not fixed. Using JSF2 dataTable there is the constraint that the number of colums cannot be dynamic: each coloumn must have the proper jsf tag .
Is there a way to insert the columns programmatically as for the rows in the dataTable?
Also panelGrid does not suit because you have to specify and write all the tags by hand.
I prefer not to use javascript to create such a component, I would like to exploit JSF2 as much as possible.

  • 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-26T11:57:23+00:00Added an answer on May 26, 2026 at 11:57 am

    The standard JSF component set does not have such a component where it would be logically named <h:columns>. There exist however 3rd party component libraries which have such a component. For example, Tomahawk with <t:columns> and PrimeFaces with <p:columns>. The Tomahawk components doesn’t generate any additional look’n’feel, so this is perfect if you want full control over CSS yourself. The PrimeFaces one generates a customizeable look’n’feel with help of CSS themeroller framework, so this is perfect if you want to utilize themeroller to manage look’n’feel.

    Here’s an example of how you could use Tomahawk’s <t:columns>, copied and slightly changed from its tag documentation:

    <t:dataTable value="#{bean.rows}" var="row">
        <t:columns value="#{bean.columns}" var="column">
            <f:facet name="header">
                <h:outputText value="#{column.name}"/>
            </f:facet>
            <h:outputText value="#{row[column.name]}"/>
        </t:columns>
    </t:dataTable>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ZedGraph's master pane to display two graphs that have synchronized X
I have a Windows (XP) application which needs to display a two-dimensional rectangle within
I have two display objects dispObj1, dispObj2. dispObj2.stage is null. (i.e. it is not
I have tried &nbsp;&nbsp; to display two spaces in a standard output Java String.
I have two block (like Block1 and Block2) and I have to display one
So I have a 1920x1080 display, and when I try to run two xcode
I have two panels that i wish to display to the user. I decided
i have two foreach loop to display some data, but i want to use
I have two tables and I want to display only the child ID that
I have two possible widths for a string i want to display in a

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.