Skip to Content
avatar image
Former Member

Binding List in same page based on button click

Hello All,

I have a SAP UI5 View with 2 input fields, a button and a list.

My requirement is to fill up the list on button click with input from two input fields.

Data is coming from O Data Service and getting filtered based on the input field values.

Code snippet is:

var oView = this.getView();

var lv_pernr = oView.byId("IpPernr").getValue();

var lv_nachn = oView.byId("IpNachn").getValue();

var lv_vorna = oView.byId("IpVorna").getValue();

var oModel = new sap.ui.model.odata.v2.ODataModel("/sap/opu/odata/sap/name_of_service/"); this.getView().setModel(oModel);

var filters = new sap.ui.model.Filter({

and: true,

filters: [new sap.ui.model.Filter("Pernr", sap.ui.model.FilterOperator.EQ, lv_pernr),

new sap.ui.model.Filter("Nachn1", sap.ui.model.FilterOperator.EQ, lv_nachn),

new sap.ui.model.Filter("Vorna1", sap.ui.model.FilterOperator.EQ, lv_vorna)



var binding = this.byId("list").getBinding("items");


Is there anything wrong with my code as lv_pernr, lv_nachn, lv_vorna is not getting populated on button click even though I am giving input.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 16, 2018 at 01:43 PM


    Did not understood your issue.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 17, 2018 at 10:12 AM

    Hi Irfan,

    Issue is resolved.


    Add comment
    10|10000 characters needed characters exceeded