First Row selection listener problem of af:table in ADF 11g

Problem: Backing bean method for Selection Listener on ADF Table row not getting invoked for First Row.(also in case of one and only one row in the result set of the table).

Solution(Probable) : I use the word probable here because I am yet to figure out the impacts of the way-out on the advanced features and functionalities of table, if there.

A little bit more on the scenario: When af:table displayed one and only one row, the backing bean method binded to selectionListener property of the table wouldn’t get invoked. My first guess to the problem was that it might owe to the default behavior of af:table where the first row of the table is the row that’s selected by default. But removing default selected row key property did not seem to help either. So I tried something from scratch. The ADF application attached to the post however is no where close to the complexities and functionality expectations from a  table. So I am yet to confirm if what I tried affects anywhere in the functionality implemented in the particular use-case from where I was made aware of the issue.

This is what I tried:

1. Created a VO(ViewObject) based on the Employees table(from our famous HR database schema, that comes along with default installations of Oracle Express Edition Database). Controlled the query to return one and only one row.

2. Dragged the DataControl to a .jspx page and selected ADF Read Only Table with “No Selection”.

3. Once the table is created, went to the property inspector and changed the Row Selection property to Single.

JDeveloper ADF Project.  ADFTableApp.zip

Leave a comment