我正在使用dojox / app构建一个Web应用程序,我的config.json文件如下:
{
"id": "app",
"name": "app",
"description": "My app",
"dependencies": [
"commonapp/app",
"commonapp/BaseViewController",
"dojo/store/Memory",
"dojox/app/utils/mvcModel",
"dojox/mvc/EditStoreRefListController",
"dojo/store/Observable"
],
"controllers": [
"dojox/app/controllers/Load",
"dojox/app/controllers/Transition",
"dojox/app/controllers/Layout",
"dojox/app/controllers/HistoryHash"],
"stores": {
},
"models": {
},
"defaultView": "MainTemplate",
"views": {
"MainTemplate": {
"template": "commonapp/templates/MainTemplate.html",
"controller": "commonapp/templates/MainTemplate.js",
"nls": "commonapp/templates/nls/MainTemplate",
"defaultView": "LoginView",
"views": {
"LoginView": {
"template": "commonapp/login/LoginView.html",
"controller": "commonapp/login/LoginView.js",
"nls": "commonapp/login/nls/LoginView"
},
"AppView": {
"template": "commonapp/app/AppView.html",
"controller": "commonapp/app/AppView.js",
"nls": "commonapp/app/nls/AppView",
"views": {
"LeftContainerView": {
"template": "commonapp/app/leftContainer/LeftContainerView.html",
"controller": "commonapp/app/leftContainer/LeftContainerView.js",
"nls": "commonapp/app/leftContainer/nls/LeftContainerView"
},
"RightContainerView": {
"template": "commonapp/app/rightContainer/RightContainerView.html",
"controller": "commonapp/app/rightContainer/RightContainerView.js",
"nls": "commonapp/app/rightContainer/nls/RightContainerView"
}
}
}
}
}
}
}
在添加LeftContainerView和RightContainerView之前,一切正常。在这种特殊情况下,我希望两个视图同时处于活动状态。问题是,如果我为LeftContainerView或RightContainerView设置默认视图,则会出现一个默认视图。但是,如果我以编程方式触发事件以在加载AppView时显示两个视图,其中一个将自动隐藏,问题仍然存在。
基本上,我们的想法是AppView将有一个fixedsplitter,并且在每个窗格上,我想放置一个子视图。有没有人知道如何让LeftContainerView和RightContainerView同时处于活动状态?
答案 0 :(得分:0)
你是否尝试过这种方式:
"defaultView": "LeftContainerView+RightContainerView"
如https://dojotoolkit.org/reference-guide/1.9/dojox/app.html#defaultview?
所示(告诉你正在使用的Dojo版本也很有用。)