cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

On Navigation of the itemObject page I wanted to clear the value set of the Macro filter.

dhananjayguptadev
Associate
Associate
0 Likes
324

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());
}, 
 

Accepted Solutions (0)

Answers (0)