我正在尝试创建一个数据存储来填充一个组合框,一切似乎都工作正常,但是我的组合框没有出现在我想要的地方,实际上它没有出现在任何地方。
我正在尝试这样的事情。
//this is the content pane where i want the combobox
var tab = new dijit.layout.ContentPane({
title: "tab",
style:"width:100%; height:500px",
content: "Here goes the comobox",
});
tab_container.addChild(tab);
// this is the combobox and store created
Types = function() {
dojo.xhrGet
({url:"json/types.json",
handleAs: "json",
load: function(types, details) {
PropertyMap.TypeStore = new dojo.data.ItemFileReadStore({
data : {
identifier: 'id',
label: 'display',
items : types
}
});
},
error: function(error_msg, details) {
content.handleError(error_msg, details);
}});
};
XXX.createPlaceTypeStore = function(types) {
var PlaceTypeStore = new dojo.data.ItemFileReadStore({
data:{
identifier:"id",
label:"display",
items:types
}
});
var combo_box = new dijit.form.ComboBox({
name : "options",
placeHolder:"options place",
value:"",
store: PlaceTypeStore,
searchAttr:"display"
});
combo_box.placeAt("tab");
// i am getting this error
refNode is null
[Break On This Error]
if(has("dojo-combo-api")){