Hi,
I tried to display Icontab filters in IconTabBar dynamically from Odata with inputs.Please verify and share your suggetions to bind/set data to the IconTabBar.
Below pseudo code I used
XML View :
<IconTabBar id="idIconTabBarcib" select="chgCatgTabSelect" >
<items><IconTabFilter key="{ZCatg" text="{ZText}">
</IconTabFilter></items> <!-- sap.m.IconTab -->
<content></content> <!-- sap.ui.core.Control --> </IconTabBar>
Controller :
var oModel = this.getView().getModel();
var sPath = "/PENDING_DETAILS_EMP_INFOSet(ImPernr='4039',ImWiid='000001598333')";
if(oModel){
var oContext = new sap.ui.model.Context(oModel,sPath);
}
if(oContext){
var oController = this; oModel.read(sPath,{
success: function(oData,oResponse){ oController.getView().byId("idIconTabBarcib").bindAggregation(oData);
},
error: function(oResponse){ //alert("Error"); } }) }
Please let me know what should be syntax to pass above filter values and bind it to IconTab Filter items