Thursday, January 30, 2014

How to configure SelectOneChoice top line filter for component in ADF ?

This blog explains about defining <af:selectOneChoice> component in a top line filter in <af:table>

Scenario : For example, We are storing employee ID's into database table, but in table we are displaying employee Names instead of ID's , View Object contains only employee ID's , If user tries to filter table by employee name it will not show any results, because filter criteria applies against  ID's. To resolve this issue, we can display a list of employee names in a top line filter as SelectOneChoice or SelectManyChoice components, Display  Names as 'Label' and Employee ID's as 'Value' , User can select any employee name in a list and hit enter it filter the table based on selected employee ID and display the corresponding results.

Implementation

- Below is the screenshot how it looks like after implementing SelectOneChoice component as a topline filter

User can select any one of the employee as shown below

-Define the View Object at Ammplication Module Level, In this example, I am going to display MarketingCoordinatorLOV which is already configured in my App Module. Define tree binding in corresponding page definition as follows.


-Below is how code looks like in page fragment, unselectedLabel ="" shows blank label.




No comments:

Post a Comment