Hi,
I have an interesting issue which is bothering me a lot:
I have created the XML View with the TreeTable in it, additionally this view contains a SearchBox. What I was trying to achieve was to enable filtering the results. I am using WEB IDE.
The code for filtering is pretty straightforward:
var oTable = this.byId("Tree");
var oModel = oTable.getModel();
var oFilter = new sap.ui.model.Filter("EntityID", sap.ui.model.FilterOperator.EQ, searchString);
oModel.read("/HierarchyObjectSet", { filters: [oFilter], success: this.onResult });
When I am checking the result (oData of the success) I receive the filtered values (which is ok)
onResult: function (oData, response)

It comes after the backend code is performed (GetEntitySet).
However, the return of the correct data does not mean that the TreeTable has changed values.
I tried to use:

but the tree was null and hence I could not access the TreeTable and modify it’s model.
Could you tell me what am I doing wrong?
Btw. I tried even writing something like this:
var list = this.getView().byId("Tree");
var binding = list.getBinding(); binding.filter(oFilter);
Just after oModel.read
which did not give any results.
Thank you in advance!
Request clarification before answering.
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.