- Give your "af:tableSelectOne" an id property for instance “select_id”.
- Give all the columns in your table an onClick property for instance: onclick="makeCurrent(this);"
- Ad javascript to your page with yhe following code:
- document.getElementById(tr.id.substring(0,tr.id.lastIndexOf(":")+1)+"select_id").checked=true;
Try out your page and you'll see it works. Every click on a column in your table will make the current row indead current.
What this code does is working around the ADF coding for your table columns; Adf will generate the following id for an item(inputtext1) residing in the second row in your table("tab_1") on your form ("form_1") ..............(notice: zero based index)
id="form_1:tab_1:1:inputText1"
where ":1:" stands for the current row. You cannot (or do not want to) refer to this directly because it is an automatically generated number. You do not have any control on it. By substringing the entry and then adding the "select_id" to it, you can make the current row current. Just add .checked="true"
Not much code but a lot of thinking..........
Comments
thanks...
document.getElementById(this.id.substring(0,this.id.lastIndexOf(“:”)+1)+”select_id”).checked=true;
Get back to me if this doesn't help you. On monday I can give you the whole code sample.
Good luck.