SAP Fiori -UI5 Model binding

SAP UI5里如何绑定数据模型,Odata Model, Model 中包含Array等的注意事项

此文属于入门者说 

A binding path consists of a number of name tokens, which are separated by a separator char. In all models provided by the framework, the separator char is the slash "/"

 The same applies for setting a binding context for such a model. The binding path must start with the model name followed by a '>' as shown in the following example for setting a binding context.

 Modelname>/

   /Element/0"is a array" /fieldname

oControl.setBindingContext(oContext );
oControl.setBindingContext(oContext,"myModelName");
Binding path examples:

'/Products/0/ProductName'
'/Products(0)/ProductName'
'ProductName'

//with model name
'myModelName>/Products/0/ProductName'
'myModelName>/Products(0)/ProductName'
'myModelName>ProductName'
  

猜你喜欢

转载自blog.csdn.net/Kakahung/article/details/81162478