Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Not able to set primefaces data table column filterMatchMode in managed bean  RSS feed

 
Akhil Moorthy
Greenhorn
Posts: 2
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a requirement where in my primefaces datatable ,the filterMatchMode attribute(like any part of field,whole field) needs to be selected by the user by select menu .To achieve this i have declared a variable in my viewscoped managed bean as filterCriteria and set the filterMatchMode attribute as filterMatchMode="#{beanName.filterCriteria}".The bean variable is getting set in the managed bean on submit but the filtering is not happening,i am getting empty message.Also when i remove the keyed in value from filter box the data table is not restored which otherwise must be restored in normal situations.

I have used and modified the example code given in primefaces showcase here.The code snippet is as below



Inside the managed bean the filterAction method


Where am i going wrong here.Is there any way to achieve this feature.
Thanks in advance!!!

 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The value of your filtermatchcriteria won't be updated until a submit is done. Since you didn't make the selection list an AJAX control, that means that a commandButton or commandLink must be fired and the entire page re-rendered (with the updated value).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!