I istantiate a fragment by this code in the controller formAddElement
. (i use this
to pass current controller)
this._oDialog = sap.ui.xmlfragment("apps.appIntra.fragment.dialogClienti",this);
In the same controller i have a function handleSearch
handleSearch: function(oEvent) {
var sValue = oEvent.getParameter("value");
var oFilter = new sap.ui.model.Filter("RAG_SOC_1", sap.ui.model.FilterOperator.Contains, sValue);
var oBinding = oEvent.getSource().getBinding("items");
oBinding.filter([oFilter]);
},
when in the fragment i press search the function in the controller not fire.
But if I use
this._oDialog = sap.ui.xmlfragment("apps.appIntra.fragment.dialogClienti", sap.ui.getCore().byId('formAddElement').getController());
all work!! WHY??? O_o