This content has been marked as final. Show 4 replies
But some times even we use findComponentByAbsoulteLocator, its not working. So i followed the approach where you will get the rowID like the below and construct the client ID and pushing the JS to client using Service class. And it worked.
String rowId = table.getClientRowKeyManager().getClientRowKey(facesContext, table, rowKey);
But i am worried that even though we hard coded the client and executing the js function from the command button by keeping client listener's type as click, the focus is not setting. And i tried giving the id as tableId[rowIndex]:componentId in the findComponentByAbsoulteLocator.
Can you let me know is there another way to make focus only using JS on click of command button, where the button does not have any action or actionListener.
Exactly, if we use simple js function instead of using serverListener, its not working. Not only this use case, the other use case where we need to set the caret to at the end of the text is also working with serverListener not with just clientListener.
All our pages are jsff which are resided in TF's and we are using the TF's as regions. All we need to do is to just avoid having the serverListener to call backing bean method and make the bb method to push js to client side using Service class. Thanks.
let me know if you have any suggestions on how to avoid this.