We have defined macro filter in the fragment
while navigating from one item page to another in the treetable I wanted to clear the macro filter which defined inside the item object page is being cached for other item set . Below is the code i have wrote. but it is not working for onbeforeBinding if I am calling, if i wrote separate custom action and call the same method it will clear the macro filter .I suspect do i am doing something wrong with onBeforeBinding .
routing: {
/**
* Lifecycle hook triggered before binding the view to a new context.
* Used here to reset the filter bar state by clearing any existing selections,
* ensuring a clean slate for each navigation to this view.
*
* @Param {Object} oContext - The context object for the upcoming binding. */
onAfterBinding : function (oContext) {
this.onPressClear();
}
}
onPressClear: function(){
var oView = this.getView();
var filterBar = oView.byId("ismm.pps.purchasecontracts1::PPS_PurchaseContractItemObjectPage--fe::CustomSubSection::ItemPricingSimulation--idItemPriceSimulateFilterBar");
filterBar.setSelectionVariant(new SelectionVariant());
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.