1
데이터 모델과 뷰에 바인딩 모델에 :방법 둥지 SAPUI5
[{
"id": 51,
"name": "BuildingA",
"floors": [{
"id": 101,
"name": "UG"
}, {
"id": 102,
"name": "EG"
}, {
"id": 103,
"name": "1"
}, {
"id": 104,
"name": "2"
}, {
"id": 105,
"name": "3"
}, {
"id": 106,
"name": "4"
}]
}, {
"id": 52,
"name": "BuildingB",
"floors": []
}]
데이터 컨트롤러에 바인딩 :
this.getView().setModel(oResponseModel, "buildingNavigation");
데이터 뷰에 바인딩
:
<tnt:NavigationList items="{path: 'buildingNavigation>/'}">
<tnt:NavigationListItem text="{buildingNavigation>name}" icon="sap-icon://building" expanded="true" items="{path: 'buildingNavigation>floors', templateShareable:true}">
<tnt:NavigationListItem text="{name}">
</tnt:NavigationListItem>
</tnt:NavigationListItem>
</tnt:NavigationList>
을 내가하고 있어요 내비게이션 목록과 함께 here
기본적으로 바인딩은 첫 번째 레벨이 건물 이름으로 채워지기 때문에 작동합니다. 빌딩 A, 빌딩 B). 두 번째 레벨은 적절한 양의 항목을 검색하는 방식으로 작동하는 것 같습니다. (예를 들어 빌딩 A는 6 배 이하 수준을 가지고 있지만 나는 바닥에 배열의 속성 이름을받을 수 없습니다 나는 그냥 탐색 6 개 빈 항목을 보여줍니다
내가 다른 조합을 시도 :.. 예를 들어 /buildingNavigation>floors>name
모두 . 관련 정보를 포함하고 모델에 수신 그냥 제대로 액세스 할 형식을 찾을 수가 없습니다