Hi Robin,
We tried that is useful, now we are doing same for Table col template. In template I am having one button and one textview( i used horizantal layout for this).
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Status"}),
template: new sap.ui.layout.HorizontalLayout({id:"HL",
content : [
new sap.ui.commons.Button({id:"btn1",
text: "true"
}),
new sap.ui.commons.Label(),
new sap.ui.commons.TextView({id:"TV1",
text : "True"
}),
new sap.ui.commons.Button({id:"btn2",
text: "false"
}),
new sap.ui.commons.Label(),
new sap.ui.commons.TextView({id:"TV2",
text : "false"
})
]
})
})
).bindProperty("text","Status",function(oEvent){
var bt1 = sap.ui.getCore().byId("btn1");
var tv1= sap.ui.getCore().byId("TV1");
var bt2 = sap.ui.getCore().byId("btn2");
var tv2= sap.ui.getCore().byId("TV2");
if (oEvent === "1"){ //true
bt.setEnabled(true);
tv1.setEnabled(true);
}
else (oEvent === "0"){ //false
bt.setEnabled(false);
tv1.setEnabled(false);
}
i am trying to use Switch case also
/* switch(str)
{
case '1' :
return bt.setEnabled(true),tv1.setEnabled(true);
case '0':
return bt.setEnabled(false),tv1.setEnabled(false);
}
*/
but no use it is not able to bind text and button property at a time.