2 Replies Latest reply: Apr 8, 2013 4:57 AM by Frank Nimphius-Oracle RSS

    Issue in focus

    Vino Sarathy

           I am using JDeveloper for developement. I want to set focus on af:inutText at the end of the text using javascript.I am using below code
      var prgIdOne = AdfPage.PAGE.findComponent('it1');
      for me focus is set into first position.how to set focus at the end of the text. can anybody help.
        • 1. Re: Issue in focus
          Hi ,

          The code which you have given here is only responsible for putting focus on inputtext.But you want to place cursor at end of the input text for this you have to some write more java script.

          Link is following


          BTW you can find more example on google.

          • 2. Re: Issue in focus
            Frank Nimphius-Oracle

            the ADF Faces component.focus() method does not give you access to the field value. If this is your requirement then you need to lookup it1::content to get access the the actual HTML field. Then you set the focus using the DOM focus() method