you must keep in mind how JSF component Ids are generated
all jsf components follow a naming
pattern for identification, the patterns is: name of the form (two dots) name of a container (two dots) number of row (if you are using a datatable plus two dots) and keep moving on until the id of component. lets see:
The generate html of myInput will be:
if you have a panelGrid
The generate html of myInput will be: <input type="text" id="myForm:myGrid:myInput" />
Ps.: If myGryd was a parent of "myForm", so the id would be:
myGrid:myForm:myInput finally, if you use a dataTable
you input ID will be, for each row:
myForm:myTable:X:myInput -> where X is the number of the row, if the dataTable iterates 5 times, so the id of the inputs will be:
myForm:myTable:0:myInput
myForm:myTable:1:myInput
myForm:myTable:2:myInput
myForm:myTable:3:myInput
myForm:myTable:4:myInput I hope you've understood my explanation :P
Ps.: If you want to access a component by javascript, just use DOM and be happy ;D
document.getElementById( 'myForm:myTable:0:myInput' ).value = "WE ROCKS";
SCJP 1.4, SCWCD 1.4, SCBCD 5, OCUP, SCEA 5 (I), Oracle SOA Implementation Specialist, IBM Websphere Lombardi 7.1 Fundamentals
Blog: [url]http://www.leozin.com.br/blog[/url]