Using dojox libraries

1
Hi there, Before anyone says this question has been addressed in the forum already, I would like to state that I have referenced the forums questions on this issue and the ones that where most helpful were: https://community.mendix.com/questions/5599/Dojox-import-for-custom-widgets https://community.mendix.com/questions/2617/Use-dojox-in-custom-widgets https://community.mendix.com/questions/7788/How-to-include-additional-dojo-modules-in-a-custom-widget However my problem still persists when I attempt to build the project or if I run the Tools > Check Widgets. I have defined the root to the required dojox library as follows in my widget : (function () { 'use strict'; require( { packages: [{ name: 'dojox', location: '../../widgets/EmailEdit/lib/dojox' }] }, [ 'dojo/_base/declare', 'mxui/widget/_WidgetBase', 'dijit/_Widget', 'mxui/dom', 'dojo/dom-class', 'dojo/dom-construct', 'dojo/_base/lang', 'dojo/number', 'dojo/date/locale','dojo/query', "dojo/parser", "dijit/Editor", "dijit/_editor/plugins/AlwaysShowToolbar", "dijit/_editor/plugins/FullScreen", "dijit/_editor/plugins/ViewSource", "dijit/_editor/plugins/FontChoice", "dijit/_editor/plugins/TextColor", "dijit/_editor/plugins/LinkDialog", 'dojox/editor/plugins/FindReplace', 'dojox/editor/plugins/PasteFromWord', 'dojox/editor/plugins/SpellCheck', 'dojox/editor/plugins/LocalImage', 'dojo/dom', 'dojo/domReady!' ], function (declare, _WidgetBase, _Widget, domMx, domClass, domConstruct, lang, dojoNumber, dojoDateLocale, dojoQuery,parser, Editor, AlwaysShowToolbar, FullScreen,ViewSource,FontChoice,TextColor,LinkDialog, FindReplace, PasteFromWord, SpellCheck, LocalImage,dom ) { // Declare widget. return declare('EmailEdit.widget.EmailEdit', [ _WidgetBase, _Widget ], { inputargs:{ messageString: "" }, I get the following when running Tools-> Check Widgets: The following widgets will not work in a production environment. Please update them. C:..\widgets\EmailEdit.mpk When I try to create a deployment package I get the following errors in the deployment\data\temp\dojo\build-report.txt. error(311) Missing dependency. module: EmailEdit/lib/dojox/editor/plugins/AutoSave; dependency: dojox/editor/plugins/Save module: EmailEdit/lib/dojox/editor/plugins/AutoSave; dependency: dojo/i18n!dojox/editor/plugins/nls/AutoSave; error: Error: i18n resource (dojox/editor/plugins/nls/AutoSave) missing module: EmailEdit/lib/dojox/editor/plugins/Blockquote; dependency: dojo/i18n!dojox/editor/plugins/nls/Blockquote; error: Error: i18n resource (dojox/editor/plugins/nls/Blockquote) missing module: EmailEdit/lib/dojox/editor/plugins/Breadcrumb; dependency: dojo/i18n!dojox/editor/plugins/nls/Breadcrumb; error: Error: i18n resource (dojox/editor/plugins/nls/Breadcrumb) missing module: EmailEdit/lib/dojox/editor/plugins/CollapsibleToolbar; dependency: dojo/i18n!dojox/editor/plugins/nls/CollapsibleToolbar; error: Error: i18n resource (dojox/editor/plugins/nls/CollapsibleToolbar) missing module: EmailEdit/lib/dojox/editor/plugins/EntityPalette; dependency: dojo/i18n!dojox/editor/plugins/nls/latinEntities; error: Error: i18n resource (dojox/editor/plugins/nls/latinEntities) missing module: EmailEdit/lib/dojox/editor/plugins/FindReplace; dependency: dojo/i18n!dojox/editor/plugins/nls/FindReplace; error: Error: i18n resource (dojox/editor/plugins/nls/FindReplace) missing module: EmailEdit/lib/dojox/editor/plugins/InsertAnchor; dependency: dojox/editor/plugins/ToolbarLineBreak module: EmailEdit/lib/dojox/editor/plugins/InsertAnchor; dependency: dojo/i18n!dojox/editor/plugins/nls/InsertAnchor; error: Error: i18n resource (dojox/editor/plugins/nls/InsertAnchor) missing module: EmailEdit/lib/dojox/editor/plugins/InsertEntity; dependency: dojox/html/entities module: EmailEdit/lib/dojox/editor/plugins/InsertEntity; dependency: dojox/editor/plugins/EntityPalette module: EmailEdit/lib/dojox/editor/plugins/InsertEntity; dependency: dojo/i18n!dojox/editor/plugins/nls/InsertEntity; error: Error: i18n resource (dojox/editor/plugins/nls/InsertEntity) missing module: EmailEdit/lib/dojox/editor/plugins/LocalImage; dependency: dojox/form/FileUploader module: EmailEdit/lib/dojox/editor/plugins/LocalImage; dependency: dojo/i18n!dojox/editor/plugins/nls/LocalImage; error: Error: i18n resource (dojox/editor/plugins/nls/LocalImage) missing module: EmailEdit/lib/dojox/editor/plugins/PageBreak; dependency: dojo/i18n!dojox/editor/plugins/nls/PageBreak; error: Error: i18n resource (dojox/editor/plugins/nls/PageBreak) missing .. .. and lost more of the same So basically my problem is that the package definition works within my widget but the js code referenced by the widget references other js code which is in the dojox directory but is cant find it as the path its looking for is dojox/whatever/whatever. This seems to only be a problem when creating a deployment package. Anyone's suggestions or help would be appreciated. However I do want to add the library to the mxruntime libraries as this is not sustainable.
asked
1 answers
0

Good morning Alistair.

Does your widget work while it runs in the modeler? And only the build is failing?

Making a one widget for the dojox library with a global dojoConfig might help you out. Similar as described with the Jquery lib.

https://forum.mendix.com/questions/6867/Conflict-with-you-JQuery-Widgets-and-duplicated-loading-of-jQuery-Libraries-SOLUTION

Cheers, Andries

answered