0

请看我的链接

我已设置并实例化选择总线无法填充选项。另外我不确定如何在画布中放置小部件。

var response1 = [{
    "test": "Mk7ABC Card",
    "use": "lit"
}, {
    "test": "Mk7CBC Card",
    "use": "lit"
}, {
    "test": "Mk10BC Card",
    "use": "lit"
}, {
    "test": "Mk7CBC Card",
    "use": "dim"
}]

var memoStore1 = new Memory({
    data: response1
});

declare("buildSelect", [_WidgetBase], {
    buildRendering: function () {
        this.domNode = domConstruct.create("select", {})
    }
});

 new buildSelect({
        id: "selectTest",
        store: memoStore1,
        searchAttr: "test"
    }).placeAt(dom.byId('mfg_codeSelect'));

提前感谢克莱门特

4

1 回答 1

0

有几件事让我印象深刻:

  • 您正在扩展 _WidgetBase,但听起来您想扩展 dijit/form/Select
  • 您正在覆盖 buildRendering() 并且不允许父类的 buildRendering() 运行。你可能想做这样的事情:

    buildRendering: function () {
        this.domNode = domConstruct.create("select", {})
        this.inherited(arguments);
    }
    
于 2013-03-06T15:44:49.150 回答