Dojo:依赖组合框错误
Dojo: dependent combo box error
我是 dojo 的新手,并且在以下问题上投入了大量时间,但还没有成功。
initDc : function() {
new Select({
onChange: function(data) {
//call initSd here
}
}).placeAt(this.Sdc);
},
initSd : function() {
new Select({
onChange: function(data) {
}
}).placeAt(this.Sds);
},
我想在 initDc
新的 Select 的 onChange 中调用 initSd
,但到目前为止我只遇到了 undefined
或 not a function
错误.任何关于如何进行上述操作的指示将不胜感激。如果您需要更多详细信息,请告诉我。
注意:两个组合框都已经包含数据,我已经编写了数据映射的逻辑,但我仍然坚持将这两个框绑定在一起。
我已经使用了 lang.hitch
并且有效。
initDc : function() {
var initSd = lang.hitch(this, this.initSd );
new Select({
onChange: function(data) {
//call initSd here
initSd();
}
}).placeAt(this.Sdc);
},
initSd : function() {
new Select({
onChange: function(data) {
}
}).placeAt(this.Sds);
},
我是 dojo 的新手,并且在以下问题上投入了大量时间,但还没有成功。
initDc : function() {
new Select({
onChange: function(data) {
//call initSd here
}
}).placeAt(this.Sdc);
},
initSd : function() {
new Select({
onChange: function(data) {
}
}).placeAt(this.Sds);
},
我想在 initDc
新的 Select 的 onChange 中调用 initSd
,但到目前为止我只遇到了 undefined
或 not a function
错误.任何关于如何进行上述操作的指示将不胜感激。如果您需要更多详细信息,请告诉我。
注意:两个组合框都已经包含数据,我已经编写了数据映射的逻辑,但我仍然坚持将这两个框绑定在一起。
我已经使用了 lang.hitch
并且有效。
initDc : function() {
var initSd = lang.hitch(this, this.initSd );
new Select({
onChange: function(data) {
//call initSd here
initSd();
}
}).placeAt(this.Sdc);
},
initSd : function() {
new Select({
onChange: function(data) {
}
}).placeAt(this.Sds);
},