1.wex5首页模板实现了页面调度框架功能,来实现调度到所定义的页面。和windowdialog有所不同:
1)多数情况下使用页面调度这种方法。
2)页面调度框架页面没有返回值,windowdialog可以实现数据返回。
2.运用首页模板,自动生成了下面代码来映射不同的页面(w文件)。
var Model = function() { this.callParent(); this.shellImpl = new ShellImpl(this, { contentsXid : "pages", wingXid : "wing", pageMappings : { "main" : { url : require.toUrl('./mainActivity.w') } } }); };
通过事件来页面调度:
Model.prototype.modelLoad = function(event) { justep.Shell.showPage("main"); //使用页面映射的方法 }; Model.prototype.classSettion = function(event){ justep.Shell.showPage(require.toUrl('./classSetting.w')); };