I have 13 columns in a table. When I display it in a <h:dataTable>, then it expands to a very wide area on the page.
Is there any way to minimize their width or to display some columns above and some columns below?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
You can use
h:dataTable‘scolumnClassesattribute to set width of columns.From the Java EE tutorial:
You can define styles for different widths and assign these styles to your columns. Here is an example:
And in your css file:
If you want to display columns in rows you can use for example two datatables in a panelGrid: