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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:55:17+00:00 2026-06-13T16:55:17+00:00

I have a JSF data table that is displaying data based off a search

  • 0

I have a JSF data table that is displaying data based off a search successfully. However, I’m not sure how to selectively bold certain text data in a particular column.

So, for instance, I would like this text…

Here is some text that would be inside the h:column

to show up like this on the page…

Here is some text that would be inside the h:column

Here’s what my data table looks like

Results:

<h:dataTable var="results"
             value="#{logSearcherBean.results}"
             border="1">
    <h:column>#{results.logName}</h:column>
    <h:column>#{results.matchLine}</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-06-13T16:55:18+00:00Added an answer on June 13, 2026 at 4:55 pm

    You could either homebrew an EL function which manipulates the column value and returns the desired HTML,

    <h:outputText value="#{my:highlight(results.logName, logSearcherBean.query)}" escape="false" />
    

    (note that this is due to escape="false", which is mandatory to present HTML literally, also sensitive to XSS attacks if the logName is a value which is fully controlled by the enduser)

    Or grab JavaScript/jQuery which manipulates the returned HTML, see also this related question: Highlight a word with jQuery.

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

Sidebar

Related Questions

I have a JSF data table <h:dataTable id=memberTable value=#{bean.pList} border=0 rowClasses=rowEven rowOdd var=item> <h:column
I have this JSF table which is used to display data. I want to
I have a JSF application with a Data Table. Each row has a 'commandLink'.
I am using primefaces and JSF 2.0. I have a data table with a
I have a JSF search command button and a tomahawk dataTable that showing the
I am using JSF 2.0 and PrimeFaces 2.2. I have a data table whose
I have a category table in MySql database that holds the following data. id
I have a JSF page that is included in other JSF pages (basically a
I have a problem displaying validation errors that are triggered by ui components which
How can i display data from two joined tables in jsf 2.0? I have

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.