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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:04:22+00:00 2026-06-07T22:04:22+00:00

In my application, I have the following <p:dataTable> : The 2nd column’s header costs

  • 0

In my application, I have the following <p:dataTable>:

data table

The 2nd column’s header costs too much spaces. Hence, I’d like to put a linebreak between Number of & Sessions and also vertically align the headers of the table. I tried to reduce the width of the column but it didn’t automatically result in a linebreak.

Besides, since the header name is retrieved from the l10n.properties file, I also tried to set it as Number of /n Sessions but /n was printed out as a normal string.

UPDATE: I also tried to set the property as Number of <br/> Sessions. However, in the HTML code generated, <br/> disappeared and the table looks exactly the same as above.

I’d be very grateful if you could give me an advice.

Best regards,

  • 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-06-07T22:04:23+00:00Added an answer on June 7, 2026 at 10:04 pm

    First of all, you need to remove the headerText attribute from the column and add a header facet inside it:

    /*  no_of_sessions = Number of &#10; Sessions  */
    <p:column ... >
        <f:facet name="header">
            <h:outputText value="#{l10n.no_of_sessions}" 
                      escape="false" style="white-space:pre-line;" />
        </f:facet>
        ...
    </p:column>
    

    The escape="false" is relevant so html is escaped, then you can put anything you want in there. If you just want to style content, this is not needed

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following application: I have 1 window. On that window I add
In my application I have the following tables: Posts id title content Users id
In my Rails 3.2.3 application I have the following code in the application.html.erb to
I have following code in my application: // to set tip - photo in
I have following requirement in my application. A tableView with games title After selecting
I have following code in my Application. Comments in my code will specify My
I have following code in my application. [self.navigationController pushViewController:x animated:YES]; It will push a
I have following architecture in my application. Client (GWT) <--calls--> Servlet <--calls--> Service <--calls-->
I have following problem: I have built a tabbar application with 4 tabs. I
I have following models setup in my Django application class School(models.Model): name = models.TextField()

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.