Skip to Content
0

IconTabSeparator setVisible function from SAPUI5 doesn't work

4 days ago

40

avatar image

Hi!

I'm developing an application utilizing the SAPUI5 framework and, as the documentation suggests, it should be possible for me to change the visibility of the Icon Tab Separator, since it indicates the "visible" parameter exists and the "setVisible" function also exists for this element (https://sapui5.hana.ondemand.com/#/api/sap.m.IconTabSeparator/methods/setVisible). But, when changing this parameter, nothing happens to the separator and when I attempt to use the "setVisible" function, it returns an error that claims such function doesn't exists. Is the documentation outdated or is there any specific way to use this function?

Thanks in advance,

Pedro Almeida

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Pedro Almeida 4 days ago
0

Here goes my code, thanks for the quick reply!

Details.view.xml:

...

<IconTabFilter id="details-iconTab-IconTabFilter-1" icon="sap-icon://hint" iconColor="Default" text="" count="" design="Vertical" showAll="false" textDirection="Inherit" enabled="true" visible="true" iconDensityAware="false" key="details"> ... </IconTabFilter> <IconTabSeparator id="iconTabSeparator1" icon="" iconDensityAware="false"/> <IconTabFilter id="risksTab" icon="sap-icon://message-warning" iconColor="Critical" text="" count="" design="Vertical" showAll="false" textDirection="Inherit" enabled="true" visible="true" iconDensityAware="false">... </IconTabFilter>

...

Details.controller.js:
...

this.getView().byId("iconTabSeparator1").setVisible(false);

if (obj.woclass) { this.getView().byId("risksTab").setVisible(true); this.getView().byId("iconTabSeparator1").setVisible(true);
} else if (prnum) { this.getView().byId("prlinesTab").setVisible(true); this.getView().byId("iconTabSeparator1").setVisible(true); }
Share
10 |10000 characters needed characters left characters exceeded
Jamie Cawley
4 days ago
0

Just tried this and it worked without issue for me. Maybe your code is wrong or you are sending a string instead of a boolean. It would be helpful if you provided your code.

Regards,

Jamie

Share
10 |10000 characters needed characters left characters exceeded
Jamie Cawley
4 days ago
0

Have you tried setting it directly on the control

<IconTabSeparator id="iconTabSeparator1" visible="false" icon="" iconDensityAware="false"/>

What error do you see? What UI5 version?

Regards,

Jamie

Share
10 |10000 characters needed characters left characters exceeded
Pedro Almeida 3 days ago
0

Jamie,

I've tried that as well, without success. My app is using UI5 version 1.38.31.

Best regards,

Pedro Almeida

Share
10 |10000 characters needed characters left characters exceeded
Jamie Cawley
yesterday
0

Looks like this capability didn't exist until version 1.44. Alternatively you could just toggle a style using jquery

$("#" + this.getView().byId("iconTabSeparator1").getId()).css('display', 'none');
$("#" + this.getView().byId("iconTabSeparator1").getId()).css('display', '');

Regards,

Jamie

Share
10 |10000 characters needed characters left characters exceeded