myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Bashan <>
Subject RE: Datatable Filtering
Date Fri, 11 Jul 2008 17:32:23 GMT
I have a also encountered this problem many time, and haven't found any
reasonable way of doing it in JSF other than getting the value from the drop
down as a query parameter and generating the table data directly from the

For example:

private List data;

public List getTableData()
	if (data == null)
		String selection = getQueryParameter("formData:myDropdown");
// The parameter can be taken from the faces context, I don't remember the
exact code now...
		data = myDAO.getTableData(selection);

	Return data;

Hope it helps, or someone else give better solution.


-----Original Message-----
From: Janap [] 
Sent: Thursday, July 10, 2008 6:43 PM
Subject: Datatable Filtering

Hello all ,

I need to filter rows of the Datatable depending on the criteria entered by
the user. The criteria is in the form of selectBox right above the

So , after the user enters the criteria and submits the form  I  capture the
criteria and generate a new query and then load the Datatable with the new
query. This is how I want it to work.

I implemented it already but since my Datatable is loaded in the Apply
Request Values phase, I am not able to read the new values of criteria
before that. I am using immediate="true" and value binding on the selectBox

What is the correct way to do this?? Do I have to use component binding to
get new values of selectBox before the Datatable model reloads or do I need
to push Datatable model reloading to the UpdateModel phase.

I am using Request scope all throughout my application.

Thx for the help,

View this message in context:
Sent from the MyFaces - Users mailing list archive at

View raw message