Hello, I'm afraid I don't understand issue what you are facing.
You want to disable selection listener when no data are displayed?
Yes look at the pictures in the order 1,2,3 in 3 must not be appeared Button
Notice in the second picture appeared Button because he chose a row.
in the third picture appeared Button and there is no search result, Must Die listener
Because, if I came back and worked search shows that I chose this row must showthe new result and have not selected row
or I want to listener on the number of row
Could you please check that the buttons are being re-rendered when doing action?
It is possible that you have not specified the buttons (or table header) to be rendered during this request)?
You can see a4j:log component for this purpose: