5 Replies Latest reply on Mar 21, 2017 8:19 AM by Ashish Awasthi

    Focus of cursor on next row first column

    I_am_sreeni

      Hi, I am using  Jdev Version 12.2.1.1.0. In one of my screen i am having an editable table and i am having a custom create row method for creating a new row. The issue i am facing is when i click on create button a row is getting created but the cursor focus doesn't appear in the new row column unless a click action is performed on a column. Can anyone help me in bringing the cursor focus to the new row's first column as soon as a row is created. I also used a javascript function to do so but it didnt work for me. My javascript function is stated below.

       

             <af:resource type="javascript">

                     function focusOn(elementId) {

                      console.log("function called");

                      //var numberField = event.getSource();

                      //console.log("numberField=="+numberField);

                      //elementId=numberField._clientId;

                      console.log("elementId=="+elementId);

                      document.getElementById(elementId).focus();

                      }       

             </af:resource>