Note that there are some explanatory texts on larger screens.

plurals
  1. PODojo Widget - Silent fail between BuildRendering and PostCreate
    primarykey
    data
    text
    <p>I'm trying to develop a table of content style widget for a map in my web application. The widgets works quite well in Chrome and FireFox but fails silently in internet explorer 8 (I have read that so many times while developping this application!)</p> <p>I'm using the dojo framework and I figured out that it fails between the BuildRendering and PostCreate methods of the widget lifecycle. The widget is created using a graph structure so it is recursive. Does anyone have any idea what can cause failure between these two methods of the widget life cycle?</p> <p>I have read in some places that the template may be a problem, so I've included it following my Node code.</p> <p>Here's a simplified version of the widget so you can maybe get an idea of what's happening :</p> <pre><code>define(['dojo/_base/declare', "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin", "dojo/text!./templates/_Node.html"], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, template) { var _Node = declare ([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], { templateString : template, _childNodes : [], constructor : function (params, srcNodeRef) { lang.mixin(this, params); this.inherited(arguments); }, buildRendering: function (){ this.inherited(arguments); // Execution leaves this function but never launches postCreate() // buildRendering is not actually there in my code, I just have it here for // debugging this particular problem. }, postCreate : function () { // Execution never reaches this point in IE8 (probably 7 and 9 as well) var newParams = { "Para1": "Value1", "Para2": "Value2" } var newNode = new Node(newParams, this.containerNode); this._childNodes.push(newNode); } }); return _Node; }); </code></pre> <p>And here's the template it uses:</p> <pre><code>&lt;div&gt; &lt;div data-dojo-attach-point="rowNode" data-dojo-attach-event="onclick:_onClick"&gt; &lt;span data-dojo-attach-point="contentNode"&gt; &lt;span data-dojo-attach-point="checkContainerNode"&gt;&lt;/span&gt; &lt;img src="${_blankGif}" alt="" data-dojo-attach-point="iconNode"&gt; &lt;span data-dojo-attach-point="labelNode"&gt;&lt;/span&gt; &lt;/span&gt; &lt;/div&gt; &lt;div data-dojo-attach-point="containerNode" style="display: none;"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>So my node follows this structure but like I said, silently fails between buildRendering and postCreate in Internet Explorer. I've spent quite a bit of time on this already. I hope someone can give me a hand here.</p> <p>And please don't look at the syntax too much, I copy pasted parts of my code but I modified it heavily for clarity.</p> <p>Thanks,</p> <p>Ggilmann</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload