OpenUI5 version:
1.71.62 and above
Browser/version (+device/version):
NA
I created a user preferences entry using the API found here:
https://sapui5.hana.ondemand.com/sdk/#/api/sap.ushell.renderers.fiori2.Renderer%23methods/addUserPreferencesEntry
This entry remains as long as the user doesn't refresh the page. This means preferences entries aren't application specific, even when we add them in the App.controller.js for example, since the user can still see the entry when they navigate to a new application.
I looked around a bit in UserSettings.controller.js and found that the entry factory can a take "visible" boolean to control whether the entry is visible or not:
If I add the visible attribute manually, the other settings are broken, and an error in the console complains about creating duplicates.
If there is no way to destroy the entry once it is created, there must be a way to hide it. The current workaround would be to reference directly the sap.m.StandardListItem control using sap.ui.getCore().byId() and hide it, or somehow navigate upward from the user preferences' content to that control and hide it.
OpenUI5 version: 1.71.62 and above Browser/version (+device/version): NA
I created a user preferences entry using the API found here: https://sapui5.hana.ondemand.com/sdk/#/api/sap.ushell.renderers.fiori2.Renderer%23methods/addUserPreferencesEntry This entry remains as long as the user doesn't refresh the page. This means preferences entries aren't application specific, even when we add them in the App.controller.js for example, since the user can still see the entry when they navigate to a new application. I looked around a bit in UserSettings.controller.js and found that the entry factory can a take "visible" boolean to control whether the entry is visible or not:
However, in Shell.controller.js this is completely ignored
If I add the visible attribute manually, the other settings are broken, and an error in the console complains about creating duplicates.
If there is no way to destroy the entry once it is created, there must be a way to hide it. The current workaround would be to reference directly the sap.m.StandardListItem control using sap.ui.getCore().byId() and hide it, or somehow navigate upward from the user preferences' content to that control and hide it.