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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:30:13+00:00 2026-06-12T04:30:13+00:00

I am using PF 3.4 and trying to filter a column which has enum

  • 0

I am using PF 3.4 and trying to filter a column which has enum value. I am using jsf 2.0’s enum converter. But filtering does not work for me here is the sample code :

<p:dataTable id="projeTeklifiListesiDataTable"
                value="#{controller.model.projeTeklifiListesi}"
                var="proje" paginator="true" rowKey="#{proje.id}"
                rows="50"
                selection="#{controller.model.secilenProjeTeklifi}"
                selectionMode="single" styleClass="defaultList">


                <p:column headerText="#{etiket['pfdy_hzrl_vt013']}" 
                              filterBy="#{projeTeklifi.projeTeklifiDurumu}"
                              filterOptions="#{controller.model.projeTeklifiDurumuListesi}" 
                    sortBy="#{projeTeklifi.projeTeklifiDurumu.toString()}">  
                       #{proje.projeTeklifiDurumu.toString()}  
                </p:column>
                <p:column headerText="#{etiket['pfdy_dkd_vt010']}" filterBy="#{projeTeklifi.basariDurumu}"
                    filterOptions="#{controller.model.basariDurumuListesi}"
                    sortBy="#{projeTeklifi.basariDurumu.toString()}">  
                       #{proje.basariDurumu.toString()}  
                </p:column>
            </p:dataTable>

this are the lists for the filter options

public SelectItem[] getProjeTeklifiDurumuListesi()
{
    final ProjeTeklifiDurumu[] durumListesi = ProjeTeklifiDurumu.values();
    final SelectItem[] projeTeklifiDurumListesi = new SelectItem[durumListesi.length+1];
    projeTeklifiDurumListesi[0] = new SelectItem("", "Seçiniz");
    for(int i =0;i<durumListesi.length;i++)
    {
        final SelectItem select = new SelectItem(ProjeTeklifiDurumu.valueOf(durumListesi[i].name()),durumListesi[i].toString());
        projeTeklifiDurumListesi[i+1]=select;
    }
    return projeTeklifiDurumListesi;
}

public SelectItem[]  getBasariDurumuListesi()
{
    final BasariDurumu[] durumListesi = BasariDurumu.values();
    final SelectItem[] projeTeklifiDurumListesi = new SelectItem[durumListesi.length+1];
    projeTeklifiDurumListesi[0] = new SelectItem("", "Seçiniz");
    for(int i =0;i<durumListesi.length;i++)
    {
        final SelectItem select = new SelectItem(durumListesi[i],durumListesi[i].toString());
        projeTeklifiDurumListesi[i+1]=select;
    }
    return projeTeklifiDurumListesi;
}

I have tried with different value bindings for SelectedItem class bind the enum itself, bind the name of the enum, called toString() method but it does not filter. I can see that my value binding of the filter option is posted correctly but does not filters the data.

Any clue would be helpful.

Thank you.

  • 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-12T04:30:15+00:00Added an answer on June 12, 2026 at 4:30 am

    Look at org.primefaces.component.datatable.DataHelper

    void decodeFilters(FacesContext context, DataTable table) {
      ...
    
      String columnValue = String.valueOf(column.getValueExpression("filterBy").getValue(context.getELContext()));
      ...
    }
    

    They are decoding the value as is, so no converter will be used i think.

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

Sidebar

Related Questions

I'm trying to filter a Spring configuration file using Maven filtering. My POM is
I have 2 dropdown lists on my webform and using jquery trying to filter/reset
I am trying to filter a fusion table using the WHERE clause in order
I'm trying to filter some XML in JavaScript using E4X and have some specific
I'm trying to filter by a list of values using the criteria API. I
I'm trying to filter webserver log files using grep. I need to output all
Scraping pages using BeautifulSoup; trying to filter out links that end in ...html#comments Code
I'm trying to implement chained filter dropdown using just javascript - jquery. The solution
I'm trying to create a regular expressions that will filter valid emails using PHP
I am trying to do a multi column filter as shown in this page

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.