Good evening. I've been asked to update a web app that was implemented in RichFaces. The application has a rich:extendedDataTable inside of a composite component that displays some searchable data. The update I've been asked to implement is to have the first row in the table automatically selected when a search is submitted. I couldn't find a way to do this from the backing bean, but I did see that it can be done with the JavaScript API, by calling the selectRow and setActiveRow functions, but the problem is that I need the 'clientId' of the table, and if I inspect the DOM and get the client id of the table, let's say "junk:tableId", and I hard code that into the function,
#{rich:component('junk:tableId')}.selectRow(0);
#{rich:component('junk:tableId')}.setActiveRow(0});
Things work like I need them to. To retrieve the clientId, I found the rich:clientId function, and I confirmed that rich:clientId('tableId') returns the same clientId that I got from the DOM, so I updated my original function calls
#{rich:component('rich:clientId('tableId')')}.selectRow(0);
#{rich:component('rich:clientId('tableId')')}.setActiveRow(0});
And it doesn't work, and now I'm not sure what to try. Does anyone know what I can try?