sapui5 - How can I filter through a table using a ComboBox? -


the thing need know if can create value item in combobox, think able accomplish task @ hand. like:

var oitem1 = new sap.ui.core.listitem("lab", {     text: 'lab',     value: 'lab' });  var oitem2 = new sap.ui.core.listitem("boxer", {     text: 'boxer',     value: 'boxer' }); 

then use button filter through table so:

var obutton = new sap.ui.commons.button({     text: "find",     styled: false,     press: function () {         var ofilter1 = new sap.ui.model.filter("typeofdog", sap.ui.model.filteroperator.contains, oitem1.getvalue());         var ofilter2 = new sap.ui.model.filter("typeofdog", sap.ui.model.filteroperator.contains, oitem2.getvalue());         var allfilter = new sap.ui.model.filter([ofilter1, ofilter2], false);         otable.getbinding("rows").filter(allfilter);     } }).addstyleclass("searchbutton").placeat("search"); 

this not work. i'm assuming because cannot create value listitem. if can, how do so?

edit: there way checkbox, method equivalent .getchecked()?

i figured out. used dropdownbox instead , used following code:

odropdown.attachchange(function () { otable.getbinding("rows").filter(new sap.ui.model.filter("payment", sap.ui.model.filteroperator.eq, odropdown.getvalue())); }); 

Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -