Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to set focus in a textbox using java code?

873210Oct 14 2011 — edited Oct 14 2011
Hi All,

In my adf application,I want to set the focus on a textbox. I was able to achieve this on pageload by setting af:document's initialFocusId="it1".

But I want the focus to be set back in the texbox after a button click if the values entered by the user in the textbox is wrong.

I have seen javascripts to achieve this, but is there someway to achieve it using pure java code in adf. I want the focus to be set in a textbox after clicking on a button.

I will be writing the code in try catch.

We are using jdev 11.1.1.2.0.


Please advise,
Susan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2011
Added on Oct 14 2011
9 comments
741 views