2015-06-25 42 views
0

我正在嘗試將sap.ui.layout.form.FormFormContainerFormElements添加到預覽Dialog。但是,我的表單及其元素並未呈現。
Click Here爲什麼我的預覽窗口不顯示FormElement內容

{ 
    "Type": "sap.ui.core.mvc.JSONView", 
    "content": [ 
    { 
     "Type": "sap.m.Button", 
     "id": "testitemid0", 
     "text": "MyTestButton", 
     "press": "asdf" 
    }, 
    { 
     "Type": "sap.ui.layout.form.Form", 
     "id": "testitemid1", 
     "formContainers": [ 
     { 
      "Type": "sap.ui.layout.form.FormContainer", 
      "id": "testitemid2", 
      "formElements": [ 
      { 
       "Type": "sap.ui.layout.form.FormElement", 
       "id": "testitemid3", 
       "label": { 
       "Type": "sap.m.Label", 
       "id": "testitemid4", 
       "text": "My Test Label" 
       }, 
       "fields": [ 
       { 
        "Type": "sap.m.Input", 
        "id": "testitemid5", 
        "value": "My Test Input", 
        "placeholder": "" 
       } 
       ] 
      } 
      ] 
     } 
     ] 
    } 
    ] 
} 

任何想法,爲什麼它沒有呈現形式?

回答

0

我sap.ui.layout.form.Form-元素只是缺少一個佈局:

{ 
    "Type": "sap.ui.layout.form.Form", 
    "id": "testitemid1", 
    "layout": { 
     "Type": "sap.ui.layout.form.GridLayout" 
    }, 
    ... 
} 

JSBin

相關問題