2016-04-27 14 views
0

ODataサービスから、ODataサービスにいくつかのフィルタを渡す必要があるタイルに、ODataサービスのデータを表示しようとしています。私は以下のコードを使用していますが、「tileContainerのbindAggregation関数に指定されているテンプレートまたはファクトリ関数がありません」というエラーが表示されています。SAPUI5タイルコンテナフィルタを使用したODataバインディング

var tileContainer = new sap.m.TileContainer("tileContainer",{ 
      height:"80%", 
       allowAdd : true, 
       editable : false 
     }); 
     var templateTile = new sap.m.StandardTile("tileTemplate",{ 
       title : 'Orders', 
       number:'{COUNT}', 
       info:'Number of Orders', 
       icon:"sap-icon://bar-chart", 
       }); 
     oModel = sap.ui.getCore().getModel(); 
     tileContainer.setModel(oModel); 

     tileContainer.bindAggregation('tiles',{path : "/OrderSet", filters: [f1, f2]}, templateTile); 

     new sap.m.App({ 
       pages : new sap.m.Page({ 
       enableScrolling : false, 
       title : "tile container", 
       content : [tileContainer] 
       }) 
      }).placeAt("content"); 

ここで間違っていることを教えてもらえますか?

+0

更新bindAggregationメソッドのパラメータの構文は、あなたがこのためにスニペットをjsbinことはできますか? – Veeraraghavan

答えて

0

bindAggregationには2つのパラメータがあります。 sAggregationNameと​​のコードテンプレート内にある​​オブジェクトの外側に渡されるため、使用できません。これがエラーの原因です。

​​オブジェクトにパラメータを渡す代わりに、個々のパラメータを渡すこともできます。しかし、その場合、一連のパラメータを維持しなければならない。この

tileContainer.bindAggregation("tiles",{ 
    path: "/OrderSet", 
    filters: [f1, f2], 
    template: templateTile 
}); 
関連する問題