Skip to main content

Filtering af:table Without Using ADF Model

You might have seen filterable table demo in ADF Rich Client Demo App- . Today's my post is based on this item.If you want, you can download the demo source and run it locally by following the instructions given in this page

In this post I'm sharing an example illustrating table filtering with hand made FilterableQueryDescriptor. This example reuses the same implementation from rich client demo for building the custom FilterableQueryDescriptor. The TableFilterBean::processTableFilter()  method has the logic for extracting the filter criteria passed by the client. Logic for filtering the actual collection is not added - it's not there in ADF Rich Client Demo as well ;-)


You can download the sample workspace from here.
Check out TableFilterBean class - You may see more code here than you expected :-)
 [Runs with Oracle JDeveloper 11g R1]


Anonymous said…
Sir, I just downloaded the project and run the page. But the filters are not reflecting, ppr on page is fine I have checked that.

Can you say me what do I get when I print the sqlString and the end of processTableFilter method and what do I get when I print the sqlItem in each for loop.

Thanks in advance.

Popular posts from this blog

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…