on 06-07-2017 1:54 PM
Hi Experts,
I am new in SAP UI5.
I have issue in refreshing data in Search result view.
I have two separate view Search and Result View , After Input value in Search field then i am displaying data in Result View.
Check the below Code.
var srvUrl = "proxy/http/XXXX:8064/sap/opu/odata/SAP/ZUI5_DEMO_SRV";
srvModel = new sap.ui.model.odata.ODataModel(srvUrl);
this.getView().byId("table1").setModel(srvModel);
The above is working when i am writing in OnInit() Method but the same code is not working in case of Search Event at the time of press search button.
In advance thanks for the help .
Regards
Alok
.
,well, since you have this code it should be in onInit() only and this is not causing your issue and moving this code somewhere else is not a solution.
you can check below points:
1) to bind table with search result you might be reading data by passing search value as a parameter, you need to watch that data(after read for particular search parameter in success function) and set that data to your table model.
2) in other way, on search click:
var oFilters = new sap.ui.model.Filter({
path: "fieldname",
operator: sap.ui.model.FilterOperator.EQ,
value1: value from search input
}));
oTable.getBinding("items").filter([oFilters]);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.