Wednesday, June 5, 2024
 Popular · Latest · Hot · Upcoming
181
rated 0 times [  186] [ 5]  / answers: 1 / hits: 6943  / 10 Years ago, wed, august 6, 2014, 12:00:00

I'm getting the following error when using dojo/parser in my code.



parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin.



I've



define([
dojo/_base/declare,
dijit/_WidgetBase,
myApp/base/_TemplatedMixin,
dijit/_WidgetsInTemplateMixin,
dojo/text!../templates/MyTemplate.html,
dojo/i18n!../nls/Localized,
myApp/js/utils/hint,
dijit/form/ValidationTextBox,
dijit/form/SimpleTextarea,
dijit/form/Button,
dojo/parser,
dojo/domReady!
], function (
declare,
_WidgetBase,
_TemplatedMixin,
_WidgetsInTemplateMixin,
template,
l10n,
hint
) {

'use strict';

/**
* @module
*/

return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {

widgetsInTemplate: true,

/**
* @description Localized object for view
* @type {object}
*/
l10n: l10n,

/**
* @description Custom template for view
* @override
*/
templateString: template,


//postCreate: function () {
//hint(l10n.hint);
//}
});

});


I've done some research and realized it may have to do with dependencies and order. I've added the widgetsIntemplate attribute but still no dice. This only happens on first load of the page.



Can anyone help?


More From » dojo

 Answers
2

If you have widgets in your template, you have to make sure they are all preloaded.
Make sure your define has all the widgets in your template.


[#43291] Tuesday, August 5, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tyriquehenryq

Total Points: 248
Total Questions: 81
Total Answers: 105

Location: Bermuda
Member since Thu, Apr 20, 2023
1 Year ago
;