Pass props to widget's constructor in template

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Pass props to widget's constructor in template

deepakanand
This post has NOT been accepted by the mailing list yet.
I am running into a problem composing Dijit widgets using dijit/_WidgetsInTemplateMixin
. Let me try to describe it in a simple way:

Say, there is widget A and widget B

Widget B composes A in its template
I want to pass values from B->A when B is created i.e.

var widgetB = new B(params);

I want params to pass through to A's constructor

I observed that A's constructor is called during B's buildRendering().

I am not sure how/if this can be done. I would appreciate any ideas.