0
내 모델에 중첩되어있는 "machines"배열을 SAPUI5 sap.m.TileContainer에 바인딩하려고합니다. 내보기에서SAPUI5 TileContainer 중첩 JSON 데이터 바인딩
var data_main = {
\t \t \t "name":"1",
\t \t \t "company":{
\t \t \t "money":100000,
\t \t \t "name":"2",
\t \t \t "departments":{
\t \t \t "marketing":{
\t \t \t "marketingActivities":[
],
\t \t \t "marketingModifier":0,
\t \t \t "numberOfEmployees":1
\t \t \t },
\t \t \t "production":{
\t \t \t "output":14281.287062979532,
\t \t \t "outputCoefficientOfEmployees":10,
\t \t \t "machines":[
\t \t \t {
\t \t \t "priceForNextUpdate":0,
\t \t \t "effectOnOutput":200,
\t \t \t "level":1,
\t \t \t "price":0,
\t \t \t "name":"lauterTub",
\t \t \t "id":1,
\t \t \t "value":2000,
\t \t \t "costPerRound":100
\t \t \t },
\t \t \t {
\t \t \t "priceForNextUpdate":0,
\t \t \t "effectOnOutput":500,
\t \t \t "level":1,
\t \t \t "price":0,
\t \t \t "name":"fermantingVat",
\t \t \t "id":2,
\t \t \t "value":5000,
\t \t \t "costPerRound":200
\t \t \t },
\t \t \t {
\t \t \t "priceForNextUpdate":0,
\t \t \t "level":0,
\t \t \t "price":0,
\t \t \t "effectOnCapacity":0,
\t \t \t "name":"storage",
\t \t \t "id":3,
\t \t \t "value":0,
\t \t \t "costPerRound":0
\t \t \t },
\t \t \t {
\t \t \t "priceForNextUpdate":0,
\t \t \t "effectOnQuality":0,
\t \t \t "level":0,
\t \t \t "price":0,
\t \t \t "name":"beerFilter",
\t \t \t "id":4,
\t \t \t "value":0,
\t \t \t "costPerRound":0
\t \t \t },
\t \t \t {
\t \t \t "priceForNextUpdate":0,
\t \t \t "effectOnOutput":300,
\t \t \t "level":1,
\t \t \t "price":0,
\t \t \t "name":"brewingCopper",
\t \t \t "id":5,
\t \t \t "value":3000,
\t \t \t "costPerRound":200
\t \t \t },
\t \t \t {
\t \t \t "priceForNextUpdate":0,
\t \t \t "effectOnOutput":200,
\t \t \t "level":1,
\t \t \t "price":0,
\t \t \t "name":"mashTub",
\t \t \t "id":6,
\t \t \t "value":2000,
\t \t \t "costPerRound":50
\t \t \t },
\t \t \t {
\t \t \t "priceForNextUpdate":0,
\t \t \t "effectOnQuality":0,
\t \t \t "level":0,
\t \t \t "price":0,
\t \t \t "name":"whirlpool",
\t \t \t "id":7,
\t \t \t "value":0,
\t \t \t "costPerRound":0
\t \t \t },
\t \t \t {
\t \t \t "priceForNextUpdate":0,
\t \t \t "effectOnOutput":100,
\t \t \t "level":1,
\t \t \t "price":0,
\t \t \t "name":"maltMill",
\t \t \t "id":8,
\t \t \t "value":1000,
\t \t \t "costPerRound":50
\t \t \t }
\t \t \t ],
\t \t \t "numberOfEmployees":2,
\t \t \t "quality":0,
\t \t \t "capacity":0
\t \t \t },
\t \t \t "procurement":{
\t \t \t "numberOfEmployees":1
\t \t \t },
\t \t \t "sales":{
\t \t \t "numberOfEmployees":2
\t \t \t }
\t \t \t },
\t \t \t "numberOfEmployees":6
\t \t \t },
\t \t \t "publicData":{
\t \t \t "markt":"Beispieleigenschaft des Marktes"
\t \t \t }
\t \t \t }
\t var model_main = new sap.ui.model.json.JSONModel(data_main);
\t sap.ui.getCore().setModel(model_main, "main");
new sap.m.TileContainer("tilecontainer_production", {
\t width: "55em",
\t height: "35em",
\t editable: true,
\t allowAdd: true,
\t tiles: {
\t path: "main>/company/departments/production/machines",
\t template: new sap.m.CustomTile({...})
)};
그러나 아무것도 작동하지 않습니다. 나는
- 주요>/기계에 바인딩을 시도
- 주> 기업/부서/생산/기계
- 주요>/회사/부서/생산/기계/
아무 것도 작동하지 않습니다.
미리 감사드립니다. 정말 고생했습니다.
바인딩. 배열 머신의 모든 객체에 대해 하나의 타일을 갖고 싶습니다. – Steinroe
내 대답이 업데이트되었습니다. 실수로 유감입니다. 그러나 이것은 명확하게 작동 할 것이다. – Beka