Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

Get Focus from actual active input field

i have 3 input fields and the scanBarcode function for Android device as button. the scan function works fine, i get the scan results. but how do i get the information which field has the active cursor to pass the scanned value ?


thx for any ideas

tony




ok found it by myself:

 

var oCore = sap.ui.getCore();
var id = oCore.getCurrentFocusedControlId();

 

but now next question appears : How can i set a Value to my id. 

Hello Tony,


Please try : "sap.ui.getCore.byId(id).setValue(<my_value>);"


Best regards.



PEB

worked like i expected.

 thx PEB

Login or Signup to post a comment