Login Register

parameters passed into custom widget

Are not being displayed at all.

The $varName is being displayed. Nor am I getting any error messages.

I've ripped everything out and got it down to basics and this is what I now have (with the same results):

page calling the widget:

<script type="text/javascript" src="js/dojo-1.1.0/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
<script type="text/javascript">
   dojo.require("dojo.parser");
   dojo.require("dijit.Declaration");
   dojo.require("customWidgets.doubleList.doubleList");
</script>
...
<div>
   <div id="dlist" dojoType="customWidgets.doubleList.doubleList" dlInfo="test text"></div>
</div>

Custom widget js:

dojo.provide("customWidgets.doubleList.doubleList");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");

dojo.declare("customWidgets.doubleList.doubleList",
[dijit._Widget, dijit._Templated],
{
        templateString : null,
        templatePath : dojo.moduleUrl("customWidgets.doubleList", "templates/doubleList_v1.htm"),
        dlInfo=""  // just casting it as a string
}
);

Stripped down html template:

<div>
   <p class='info'>$(dlInfo)
</div>

Any suggestions are appreciated

got the answer on IRC

I used parens instead of curly braces in my html template, made that change and it worked like a charm.