You can't access the property directly.(您不能直接访问该属性。)
You have to use geters and setters to access it's value.(您必须使用获取器和设置器来获取其价值。) You could instead bind the whole property.(您可以改为绑定整个属性。) The binding system is smart enough to detect the event emitted, extract the property's value and apply it to the target.(绑定系统足够智能,可以检测到发出的事件,提取属性的值并将其应用于目标。)
Here is a working code(这是一个工作代码)
qx.Class.define("xxx.view.XxxView", {
extend : qx.ui.container.Composite,
construct : function() {
this.base(arguments);
this._CaseIDLabel = new qx.ui.basic.Label("initial");
// containers need a layout
this.setLayout(new qx.ui.layout.Canvas());
this.add(this._CaseIDLabel);
// notice here we are binding this object's property
this.bind('CaseID', this._CaseIDLabel, 'value');
},
properties : {
CaseID : {
check : 'String',
event : "changeCaseID",
init : '000000000'
}
},
members : {
_CaseIDLabel : null
},
});
here is the playground example https:// tinyurl.com/rt5v8zx(这是游乐场示例https://tinyurl.com/rt5v8zx) 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…