I think I'm missing something obvious here in Dojo 1.8 w.r.t. writing custom widgets.
I have a simple widget that includes, among other things, a currencyTextBox.
At runtime, I would like to be able to change the currency of that widget to USD or EUR or whatever else.
Normally, if this wasn't a widget, I could do that simply with
registry.byId("myCurrentTextBox").set("currency","USD");
But nested widgets inside of custom widgets don't get registered in the registry. So, what's the trick to getting addressability to the widget and assigning widget attributes (not just DOM attributes) for a widget nested inside a custom widget?
Add
data-dojo-attach-point="myCurrentTextBox"
to the widget definition in the template. Then from within the widget you can access the textbox usingthis.myCurrentTextBox
.