HI When i use Dojox/gfx in a custom widget, modeler throws '404 - file not found for file: mxclientsystem/dojox/gfx/svg.js' error. Widget works fine if I don't include dojox/gfx file. I have created a test project for this widget to avoid any conflicts. I have copied dojox folder under lib folder \Interactive Clicking\src\InteractiveClicking\lib\dojox. Googled and a post recommended to add following three which i have added index.html file under theme folder. But It didn't work and still same error. I have created a simple html page with dojox and it works fine which mean i am missing something in Custom widget. Can someone help please? <script> dojoConfig = { baseUrl: "mxclientsystem/dojo/", cacheBust: "{{cachebust}}", rtlRedirect: "index-rtl.html" ,async: true ,isDebug: true ,gfxRenderer:'svg,silverlight,vml' }; </script> define([ "dojo/_base/declare", "mxui/widget/_WidgetBase", "dijit/_TemplatedMixin", "mxui/dom", "dojo/dom", "dojo/dom-prop", "dojo/dom-geometry", "dojo/dom-class", "dojo/dom-style", "dojo/dom-construct", "dojo/_base/array", "dojo/_base/lang", "dojo/text", "dojo/html", "dojo/_base/event", "dojo/mouse" ,"dojo/on" ,"dojo/fx" , "InteractiveClicking/lib/dojox/gfx" , "InteractiveClicking/lib/jquery-1.11.2" ,"dojo/text!InteractiveClicking/widget/template/InteractiveClicking.html" ], function (declare, _WidgetBase, _TemplatedMixin, dom, dojoDom, dojoProp, dojoGeometry, dojoClass, dojoStyle, dojoConstruct, dojoArray, lang, dojoText, dojoHtml, dojoEvent ,mouse,on,fx,gfx , _jQuery, widgetTemplate) {
asked
Ali Faraz
2 answers
0
You should also include svg.
,"InteractiveClicking/lib/dojox/gfx/svg"
answered
Chris de Gelder
0
Hi
Finally, i got it working but I have a question.
Firstly, how it works:
As dojox libraries are not automatically loaded so I had to define package in index.html file under the theme folder of my main project.
Also I added dojox folder under custom widget source folder (e.g., src\MyWidgetName\lib\dojox folder here) and gave this reference in the location.
In my customer widget .js file i have added following and it works.
"dojox/gfx"
What i want:
If i copy dojox folder under theme/js folder of the main project then what would be the path? I have tried different paths but didn't work. i have tried with one ../ two and trhee even but didn't work. It only works when i give widget reference