开发者

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 th开发者_高级运维e 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.


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜