Quantcast
Channel: SCN : Discussion List - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3131

How to pass the value/add the data to a table as a row from a multiselect combobox in SAPUI5?

$
0
0

Hi all,

 

I have a combobox which fetches multiple person's no from Odata.So the table gets loaded with all the records when the page is loaded.

Now the thing is,If I choose a particular number ,only that corresponding record should be added to the table and so on.

Can someone help me with this?

 

 

Here's what I have tried:

 

var personinfo = new sap.ui.core.Item({

  text : "{Person}"

  });

       

        var  employee = new sap.m.ComboBox("employee", {

  placeholder : "Select person",

  items : {

  path : "/results",

  template : personinfo

  },

  });

 

oTable = new sap.m.Table();

     oTable.addColumn(new sap.m.Column({

  header: new sap.m.Label({text:"PersonnelNo."}),

     }));

     oTable.addColumn(new sap.m.Column({

        header: new sap.m.Label({text:"EmployeeName"}),

     }));

    

     var oTemplate = new sap.m.ColumnListItem({

  type: sap.m.ListType.Active,

  cells : [        

  new sap.m.Label({

                  text : "{Person}"

  }),

  new sap.m.Label({

                  text: "{Name}"

  }),

  ]

  });

     oTable.bindAggregation("items","/results",oTemplate);

     oTable.setModel(oModelpersF4);

 

 

Thanks & Regards,

Ramya


Viewing all articles
Browse latest Browse all 3131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>