on 02-05-2018 8:32 AM
I need to know how to autofocus textbox by loading the page
What if I need to set focus to a popover that is in a separate fragment, which gets opened on clicking at a button in my UI ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
instead of onInit, write the function in "onBeforeRendering",
try this:
onBeforeRendering: function() {
jQuery.sap.delayedCall(500, this, function() { sap.ui.getView().byId("asd").focus(); }); }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ,
Use the below code, if you have designed the page in javascript
jQuery.sap.delayedCall(500, this, function() {
sap.ui.getCore().byId("name").focus();
});
If the you have used XML view, write the below code in init function of the respective control.
jQuery.sap.delayedCall(500, this, function() {
this.getView().byId("name").focus();
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.