下面是我创建 Dojo 小部件“app.ThirdWidget”的代码,它是 ICN 的 Filenet Viewer 小部件的包装器-
require([ "dojo/_base/declare",
"dojo/dom-construct",
"dojo/parser",
"dojo/ready",
"dijit/_Widget",
"dijit/_Templated",
"ecm/widget/viewer/FilenetViewer",
"ecm/widget/dialog/ErrorDialog",
"ecm/model/Desktop",
"ecm/model/Repository"],
function (declare, domConstruct, parser, ready, _Widget, template, filenet,errorDialog, desktop, repository){
declare ("app.ThirdWidget",[_Widget, template, filenet,errorDialog, desktop, repository],{
documentID : '',
templateString: '<div >' +
'<div data-dojo-attach-point="containerNode" > <span>third widget</span>' +
'<div data-dojo-attach-point="filenetViewer" data-dojo-type="ecm.widget.viewer.FilenetViewer" style="width: 100%; height: 100%; position: absolute; margin: 0; overflow:hidden" isChildWindow="true"' +
' showNextPrev="false" sideChrome="0"></div>' +
'</div>',
constructor: function(){
alert("Constructor");
},
postCreate : function(){
alert("post Create");
},
startup: function(){
alert("Start up");
}
});// declare
});//
但我在萤火虫中遇到以下错误,请帮助:
Error: declare app.ThirdWidget: mixin #4 is not a callable constructor.
throw new Error("declare" + (cls ? " " + cls : "") + ": " + msg);