user590586
user590586

Reputation: 3050

jsf focus inputtext field after form rerenders with values onblur

After onbluring an input text field inside my form , I'm rerendering the form with the new values.

In this case the field loses it's focus, I want the input that was after the one I blured out from to be focused. is there an after render event, or somthing that will give the option to choose the cell i want to focus on?

Thank's In Advance.

Upvotes: 0

Views: 2842

Answers (1)

Mr.J4mes
Mr.J4mes

Reputation: 9266

I'm not sure this would work but you can try the following:

<h:form id="myForm">

   <h:inputText id="my1stInput" >
      <a4j:ajax event="blur" render="myForm" oncomplete="document.getElementById('myForm:my2ndInput').focus()" />
   </h:inputText>

   <h:inputText id="my2ndInput" />

</h:form>

Upvotes: 1

Related Questions