I am trying to set focus to the text box on page load event. I tried many solutions by referring the element id, but couldn't able to focus the element. Later when I inspect the element using firebug I found for the same element the id changes in different execution. I am looking for the simplest solution using javascript or jquery to achieve this
<h:form id="form">
<rich:dataTable value="#{books}" var="book">
<ui:repeat value="#{authors}" var="author">
<h:inputText value="#{author.name}"/>
</ui:repeat>
</rich:dataTable>
</h:form>