How to display jimu dijit tools using declarative way without parser.parse()?

3061
2
Jump to solution
01-15-2016 09:15 AM
Labels (1)
MS2
by
New Contributor II

Is there a way display jimu dijit tools (like DrwaBox, symbolPicker) in declarative way as shown below without using dojo's parser.parse() function ? my dojoConfig.parseOnLoad is set to true.

   

<div data-dojo-attach-point="drawBox" data-dojo-type="jimu/dijit/DrawBox" data-dojo-id="drawBox" ></div>

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Mouli,

  You should NOT use parser.parse or dojoConfig.paseOnLoad. The parsing of dijit is already handles by the WAB core. If you add a jimu dijit to your widgets template html then make sure you also include the require for that dijit in your widget.js file as well. You will also need to include the 'dijit/_WidgetsInTemplateMixin' require and var _WidgetsInTemplateMixin and add _WidgetsInTemplateMixin to the declare line

return declare([BaseWidget, _WidgetsInTemplateMixin], {

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Mouli,

  You should NOT use parser.parse or dojoConfig.paseOnLoad. The parsing of dijit is already handles by the WAB core. If you add a jimu dijit to your widgets template html then make sure you also include the require for that dijit in your widget.js file as well. You will also need to include the 'dijit/_WidgetsInTemplateMixin' require and var _WidgetsInTemplateMixin and add _WidgetsInTemplateMixin to the declare line

return declare([BaseWidget, _WidgetsInTemplateMixin], {

MS2
by
New Contributor II

Thanks Robert.

0 Kudos