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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:20:44+00:00 2026-06-14T23:20:44+00:00

given the following primefaces Data <p:dataTable value=#{cc.attributes.playerCollection} var=player widgetVar=playerWidgetTable emptyMessage=#{uimsg.ui_not_recordsfound}> <!– filter event handler

  • 0

given the following primefaces Data

<p:dataTable value="#{cc.attributes.playerCollection}" var="player"
    widgetVar="playerWidgetTable" emptyMessage="#{uimsg.ui_not_recordsfound}">
    <!-- filter event handler  -->
    <p:ajax event="filter" listener="#{cc.attributes.viewBean.listenFilter}" update="@this"/>

    <!-- Player first name  -->
    <p:column id="firstnameColumn" headerText="#{uimsg.firstname}"
        filterBy="#{player.firstName}" filterMatchMode="contains">
        <h:outputText value="#{player.firstName}" />
    </p:column>
</p:dataTable>

how does someone get (on the server side) the filter “Text” value, given by the user in the filter textcolumn ?

i tried to listen to the filter event with “listenFilter”:

@ManagedBean
@ViewScoped
public class PlayerListBean implements Serializable {

......

    public void listenFilter(FilterEvent event) {
        // update datasource
        Map<String, String> tempString = event.getFilters();

        System.out.println("size filter: "+ tempString.size());
        for (String key : tempString.keySet()) {
            System.out.println("key: " + key + " \t values: "
                    + tempString.get(key));

        }

    }

}

but I can’t start something with it.
are they any other options ? like working with the DataTable as a bound Component, or else ?

thanks

  • 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-14T23:20:45+00:00Added an answer on June 14, 2026 at 11:20 pm

    What I normally do is to use an actual DataModel to feed to the dataTable component instead of using a plain collection, like you seem to be doing (you didn’t post the rest of your bean). I extend the LazyDataModel class and override the load() method, whose signature is:

    public List load(int first, int size, String column, SortOrder order, Map<String, String> filter);
    

    In this case, the filter field (map) contains whatever the user entered on each filter. Also, you don’t really need any ajax listeners for the filter. I use this in my projects and it works just fine. Let me know if you need further assistance.

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

Sidebar

Related Questions

Given the following code: $(.force-selection).blur(function() { var value = $('matched-item').val(); //check if the input's
// given following array: $data = array( 0=>array( data=>object1, col=>array( 0=>array( data=>object2, col=>array( 0=>array(
Given following array: var arr = [undefined, undefined, 2, 5, undefined, undefined]; I'd like
given following html <input id=IBE1_IBE_NurFlug1_RadioButtonList1_0 name=IBE1$IBE_NurFlug1$RadioButtonList1 value=Blue type=radio> <label for=IBE1_IBE_NurFlug1_RadioButtonList1_0>Blue</label> <input id=IBE1_IBE_NurFlug1_RadioButtonList1_1 name=IBE1$IBE_NurFlug1$RadioButtonList1 value=Green
Given the following: declare @a table ( pkid int, value int ) declare @b
Given the following test: [Fact] public void FactMethodName() { var d = 6.4133; var
Given the following example: var foo = { root: ({ key1: Value1, key2: Value2,
I'm following the example given at http://www.primefaces.org/showcase/ui/datatableRowSelectionSingle.jsf I'm using this as a portlet in
Given following code: VAR X PIC S9(7)V9(2). VAR Y PIC X(15) Following code having
Given following data, what is the best way to organize an array of elements

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.