on 09-23-2022 12:12 AM
Hello experts,
I created the IconTabBar that holds IconTabFilter items. The event select should fire the event when the item is selected.
I wrote the simple function that should be executed and show the Message "Hello". But after selecting the item doesn't do anything, so I can't even see what the issue is in a debugger.
var Bar_xx = new sap.m.IconTabBar("IconTabBarxx", {
expandable: false,
expanded: false,
applyContentPadding: true,
stretchContentHeight: false,
select: function OEvent(oEvent) {
var sId = oEvent.getSource().getId();
if(sId === "Icon1") {
showMessages("Hello");
items: [
new sap.m.IconTabFilter("Icon1", {
text: "All",
key: "All",
}),
Thank you,
Best regards,
Nikita
What if you assign unique keys to each of the IconTabFilter. Then use the keys instead of the ID. Assume the keys are a, b,c and d for 4 IconTabFilters:
select: function(oEvent){
var key = oEvent.getSource().getSelectedKey();
if(key=="a"){
showMessages("Hello");
//MessageToast.show("Hello");
}else if(key=="b"){
bla bla...
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
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.