on 11-30-2012 12:56 PM
Hi,
I was wondering, is there a way to disable the TAB navigation from SAPUI5 controls/elements?
I have a sap.ui.commons.ProgressIndicator element of which I would have the tabIndex removed.
In JQuery you would use something like
$("#progressIndicator").attr("tabindex", -1);
but that doesn't seem to work...
Is there a way I can achieve this the SAPUI5-approved way?
Best,
Robin van het Hof
Hi Robin,
you can do the same thing in SAPUI5, but you have to keep two things in mind:
- so your call needs to be done late enough and also re-done when the ProgressIndicator re-creates its HTML.
To support this, on all controls the "afterRendering" event is fired and you can also get informed about this when adding a delegate to the respective control.
The "addDelegate" API in SAPUI5 1.8.x is a private one (but still works if you want to test), in SAPUI5 1.9+ there will be a public "addEventDelegate" method.
So you can do:
myProgressIndicator.addDelegate({
onAfterRendering: function() {
$("#progressIndicator").attr("tabindex", -1);
}
});
- this will be executed whenever the ProgressIndicator HTML has been (re-)created. And make sure to switch to "addEventDelegate" when the next version of SAPUI5 is released.
Note that this feature can also be used to listen to browser events (mouse, keyboard,...) happening on the respective control (by adding methods like "onclick" to the delegate object).
And it can/should be used for other modifications of SAPUI5 control HTML as well.
Regards
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.