Emmachen / SapUi5Test02

0 stars 0 forks source link

Summary about data bindnig #2

Open Emmachen opened 8 years ago

Emmachen commented 8 years ago

Till now,Summary about data bindnig JsonModel:(标红的为比较主要的) image modle.oData:数据 model每一次setData都会检查数据是否有更新。 控件关于model的值: image mAggregations:多组值存在这里。 如comoBox.mAggregations = myListBox 展开myListBox是items:即每一个template: image mBindingInfos:绑定的属性:path,formmater,sorter,template等 mProperties:属性及值 oModels:绑定的model

注意在多值的list生成时,property:"{path}" 控件类里的方法如:bindValue,bindItems最终都是使用bindProperty(),bindAggragation(); default aggragation最终在clientListBinding中apply,checkUpdate获取List值: image 实现数据绑定: 1.new model 2.setData 3.control.setModel if(bindData:) 4.control.bindProperty(property,"/path"); elseif(bindAggragation) 4.new template 5.bindAggration("property","/path",template);

一个属性值可以有多个绑定的值,parts[{path:"path"},{}] sorter:new sap.ui.model.Sorter("path",boolean); filters:new sap.ui.model.Filter("path",sap.ui.model.FilterOperator.xxx,value1,value2) 在bindPropetrty时,没有显示指出参数值,没有sorter,有filter,需将sorter设置为null;

ghost commented 8 years ago

已阅。赞。