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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:23:09+00:00 2026-05-29T06:23:09+00:00

I have a non-editable DataTable built with PrimeFaces. The table is initially filled with

  • 0

I have a non-editable DataTable built with PrimeFaces. The table is initially filled with values obtained through a Bean’s getter:

<p:dataTable var="lndClient" value="#{clientBean.model}" rowKey="#{lndClient.stringId}">

After the table is loaded, I need to update some cells through Javascript. The reason for that is that I am using cometD, a Ajax Push Technology pattern that uses Javascript-JQuery on the client side.

I know that I can update a cell by using something like

$('td#id').html("value"); 

but my problem is that I have no clue of what is the id of my cell(s). Looking at the html generated, I see that the rows are:

<tr data-ri="1" class="ui-widget-content ui-datatable-odd"><td><div class="ui-dt-c"><a id="centerTabView:accordion:j_idt18:j_idt19:1:j_idt22" ...>
...
<tr data-ri="2" class="ui-widget-content ui-datatable-even"><td><div class="ui-dt-c"><a id="centerTabView:accordion:j_idt18:j_idt19:2:j_idt22" ...>

Indeed, the row identifier is there, although inside a td tag. And the other columns are:

<td><div class="ui-dt-c">...</div></td>

So, my question is: how can I identify a cell in a PrimeFaces 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-29T06:23:10+00:00Added an answer on May 29, 2026 at 6:23 am

    If it’s possible for you to refer to cells by column index and row id, you can use rowStyleClass attribute of p:dataTable.

    For instance if you set it as rowStyleClass="#{lndClient.stringId}", you will be able to refer to 3rd column of row with stringId xyz by something like $('tr.xyz td:first-child+td+td') – I am sure you can come up with a better selector.

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

Sidebar

Related Questions

I have a DataGridView with read-only mode set to true (non-editable) which takes values
I want a non-editable TextField (or a subclass) that doesn't even have the caret
I have a fairly pedestrian non-editable NSOutlineView setup. In the bindings for the outline
I have a few field in my entity that i wish to be non-editable.
I am using non-editable JTextPane to show some data in HTML format. I have
i have a input tag which is non editable, but some times i need
I am trying to use an editable table and have it working except for
I have non-ascii chars in velocity template files. And when processed they are garbled.
I have non-template class with a templatized constructor. This code compiles for me. But
I've been trying to deal with some delimited text files that have non standard

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.