Closed martinfitzg closed 9 years ago
Isn't it related to #414?
Hey Christophe, I taught that two initially, but to me #414 would seem to want to be able to change the template of a widget during "run time" not at the initial instantiation of a widget. I'm open to correction.....
I think this is the same as #414, because initial parameters are handled in the same way as properties changed during "run time". In other words, both initial parameters and properties changed during run time are handled in computeProperties()
or refreshRendering()
.) So, setting the template like:
new MyWidget({ template: ... })
is no different than setting the template like:
var x = new MyWidget();
x.template = ...;
or even:
var x = new MyWidget();
setTimeout(function () { x.template = ...; }, 100);
Also, "setting" the template and "changing" the template are essentially the same thing. The only difference is whether the template was initially set, or whether it was null. In the examples above, the widget prototype presumably doesn't specify a template, so there's no template until the application specifies one.
I stand corrected!
Hello all, Don't really think this qualifies as an issue, but I'm having this problem any help would be appreciated...... I need to be able to specify a template externally as a parameter to a widget when it is instantiated. In the life cycle of the Widget, the mixin phase happens after the Render function so this rules this out. Then trying to extend the widget something like the like this
_buildWidget: function(templateInput){
}
But when this is done, the "new" Render function never gets called.
Any advice is appreciated........