on 08-07-2013 10:39 AM
hi experts....
tell me how to set focus on ui textfield in ui5..
currently i am using change property of textfield that work after changing the content of textfield.....but i want to call a function on focus...that is done by onfocus method by java script....but how in ui5 textfield
Hi Sumit,
There doesn't seem to be a focus event for the TextField control (atleast going by the documentation), so it is probably not exposed by the framework.
As a workaround, you could try this jQuery snippet :
$("#" + id).on("focus", function() {
.. your focus handler code..
..
..
}
And replace "id" with the ID of the TextField you're using. Also note, that this snippet should be executed only AFTER the TextField has been rendered on the screen.
Regards,
Pritin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use method focus()
https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.commons.TextField.html#focus
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.