|
|
@ -5,41 +5,18 @@ Demo.TreeValueChooser = BI.inherit(BI.Widget, { |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
|
|
|
|
|
|
|
|
var widget = BI.createWidget({ |
|
|
|
var widget = BI.createWidget({ |
|
|
|
type: "bi.tree_value_chooser_insert_combo", |
|
|
|
type: "bi.tree_value_chooser_combo", |
|
|
|
width: 300, |
|
|
|
width: 300, |
|
|
|
// items: BI.deepClone(Demo.CONSTANTS.TREEITEMS),
|
|
|
|
// items: BI.deepClone(Demo.CONSTANTS.TREEITEMS),
|
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
callback(BI.deepClone(Demo.CONSTANTS.TREEITEMS)); |
|
|
|
callback(BI.deepClone(Demo.CONSTANTS.TREEITEMS)); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
var widget1 = BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.list_tree_value_chooser_insert_combo", |
|
|
|
|
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
|
|
|
|
callback(BI.deepClone(Demo.CONSTANTS.TREEITEMS)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
widget.setValue({ |
|
|
|
|
|
|
|
"中国": { |
|
|
|
|
|
|
|
"安徽省": { |
|
|
|
|
|
|
|
"安庆市": {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"newValue": {} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
widget1.setValue([ |
|
|
|
|
|
|
|
["中国", "安徽省"], |
|
|
|
|
|
|
|
["中国", "安徽省", "安庆市"], |
|
|
|
|
|
|
|
["newValue"] |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
type: "bi.vertical", |
|
|
|
type: "bi.vertical", |
|
|
|
items: [{ |
|
|
|
hgap: 200, |
|
|
|
type: "bi.vertical_adapt", |
|
|
|
vgap: 10, |
|
|
|
hgap: 200, |
|
|
|
items: [widget] |
|
|
|
vgap: 10, |
|
|
|
|
|
|
|
items: [widget, widget1] |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|