on 07-24-2019 7:21 PM
Hi Sebastiano,
I don't think the standard Variant Managment of UI5 can handle it. But you can extend it to fit your requirement by implementing the beforeVariantSave and afterVariantSave Events of your SmartFilterBar.
You save the pin state of the page into the _CUSTOM section of the variant when a variant is saved.
onBeforeVariantSave: function (oEvent) {
var isPinned;
isPinned = .... // get the pin state of the page header (true/false).
var oSmartFilter = oEvent.getSource();
var oData = oSmartFilter.getFilterData();
oData._CUSTOM = {
isPinned: isPinned
};
oSmartFilter.setFilterData(oData);
},
Read the property of the state out of the _CUSTOM section and apply it the the page, when you load the variant.
onAfterVariantLoad: function (oEvent) {
var oSmartFilter = oEvent.getSource();
var oData = oSmartFilter.getFilterData();
var isPinned = oData._CUSTOM.isPinned;
// now you got the state of the pin state (true/false), then set the pin state to your page. The coding here is highly depends on your page controller.
},
I hope it could help you.
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 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.