在tabcontrol中打开标签页
var tab={};
with(self.get("currentNode")){
tab.$Type="IFrame";
tab.name=get("label");
tab.path=get("userData");
tab.label=get("label");
tab.closable=true;
}
with(get("#tabControle")){
var currentTab=getTab(tab.name);
if(currentTab){
tab=currentTab;
}else{
tab.addTab(currentTab);
}
set("currentTab",tab);
}
menu菜单在view加载时初始化右键添加项目,添加子项目工程
view.get("^add").getListener("onClick",function(sef,arg.datatree){
var currentNode=datatree.get("currentNode");
if(!currentNode){
doraod.MessagBox.alert("没有选中节点");
}
var currentEntity=currentNode.get("data");
currentEntity.creatBrother({
depaname:"<部门名称>"
});
})
view.get("^addChild").addListener("onClick",function(self,arg,datatree){
var currentNode=datatree.get("currentNode");
if(!cuttentNode){
alert("没有选中节点");
}
var currentEntity=currentNode.get("data");
currentEntity.createChild({
depename:"<部门名称>"
});
});
view.get("^del").addListener("onClick",function(self,arg,datatree,update){
var currentEntity=datatree.get("currentEntity");
if(!currentEntity){
alert("请先选中一个队像");
}
currentEntity.remove();
update.execute();
});
hibernate获得默认数据源使用getModelFixdataSourcename在里面设置数据源的名字,然后子类集成它,就可以设置默认的数据源;