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

  • Home
  • SEARCH
  • 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 8649627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:36:29+00:00 2026-06-12T13:36:29+00:00

In my application (RichFaces 4.1) I have an extendedDataTable, in my backing bean I

  • 0

In my application (RichFaces 4.1) I have an extendedDataTable, in my backing bean I need to track the selected rows. I achieve this with the following code:

JSF:

<rich:extendedDataTable id="freie"
    selectionMode="multipleKeyboardFree"
    selection="#{myBean.tableSelection}"
    ...
<a4j:ajax execute="@this" event="selectionchange" 
          listener="#{myBean.tableSelection}"
          render="indicatorPanel" />

Java:

    UIExtendedDataTable dataTable= (UIExtendedDataTable) event.getComponent();
    Object originalKey= dataTable.getRowKey();
    _tableSelectedEntries.clear();
    for (Object selectionKey: _tableSelection) {
        dataTable.setRowKey(selectionKey);
        if (dataTable.isRowAvailable()) {
            _tableSelectedEntries.add((Entry) dataTable.getRowData());
        }
    }
    dataTable.setRowKey(originalKey);

This works fine, as long as the table is not filtered. I use the standard RichFaces way to filter the table:

<rich:column sortBy="#{mitarbeiter.vorname}"
 filterValue="#{mitarbeiterFilterBean.firstNameFilter}"
 filterExpression="#{fn:containsIgnoreCase(mitarbeiter.vorname, mitarbeiterFilterBean.firstNameFilter)}">

When the table is filtered and I select for instance the first row, I get the rowKey for the first row of the unfiltered table in the backing bean. How can I get the rowData of the selected row when my table is filtered?

I think my code works the same way as in the showcase.

  • 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-12T13:36:30+00:00Added an answer on June 12, 2026 at 1:36 pm

    I could solve my problem by making my filter bean SessionScoped. I also don’t bind the currently selected rows to my backing bean anymore. I get the selected rows using:

    public void tableSelection (AjaxBehaviorEvent event) {
        UIExtendedDataTable dataTable= (UIExtendedDataTable) event.getComponent();
        for (Object selectionKey: dataTable.getSelection()) {
    

    It could also be achieved using rowKeyVar to get the correct row index.

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

Sidebar

Related Questions

We have a JSF 1.2 application with RichFaces 3.3.3 on JBoss 5.1. When we
I have a JSF application that uses mostly Richfaces. I would like to introduce
I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many
I have an enterprise application written in JAVA with JSF (using RichFaces 3.3). Currently
I have a dynamic web application in Java EE with JSF, Facelets, Richfaces. My
I have jquery working in my Richfaces 3.3.3 application. I added the following to
I have a JSF 1.2 application (Sun RI, Facelets, Richfaces) that was used only
I have a newbie question in JSF, and particular in Richfaces. I need my
I have a JSF 2 application which uses a Richfaces 4 tree control. The
I'm using RichFaces on my JSF2 application, and I need a way to 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.