티스토리 뷰

SAPUI5에서 가장 빈번하게 하는 작업이 데이터 바인딩 작업인거 같다. 이런 빈번하게 일어나는 작업에서 실수가 있게 마련......  

데이터를 바인딩하는 하나의 객체를 다른 두개의 객체에 넣어줬을 때 데이터를 인식하지만 데이터가 표시되지 않을 수 있다. 예를 들어 textview 객체를 만들고 모델을 바인딩한 후 MatrixLayout과 Table에 각각 넣어주줬을 경우 둘 중 하나에서데이터가 표시되지 않는다.

var oSampleTV = new sap.ui.commons.TextView();

var oSampleML = new sap.ui.layout.MatrixLayout();


var oRow = new sap.ui.commons.layout.MatrixLayoutRow();

oSampleML .addRow(oRow);


var oCell = new sap.ui.commons.layout.MatrixLayoutCell();

oCell.addContent(oSampleTV );


oRow.addCell(oCell);

oSampleML .addRow(oRow);


var oSampleTable = new sap.u.table.Table();

oSampleTable .addColumn(new sap.ui.table.Column({

label: new sap.ui.commons.Label({text: "Text"}),

template: new sap.ui.commons.CheckBox().bindProperty("checked", "checked"),

sortProperty: "checked",

filterProperty: "checked",

width: "200px",

hAlign: "Center"

}));

'SAPUI5' 카테고리의 다른 글

Step 2: Bootstrap  (0) 2018.12.05
Step 1: Hello World!  (0) 2018.12.05
sap.ui.base.EventProvider  (0) 2014.11.28
sap.ui.base.Object  (0) 2014.11.28
SAPUI5 기본 Class  (0) 2014.11.28
댓글