Opened 11 years ago

Closed 11 years ago

#13287 closed defect (invalid)

Having dijits within a custom widget template doesn't propagate dijit-specific attributes into the dijits themselves.

Reported by: kentonr Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


I created a custom widget following this article and when I have a dijit defined within the template with some custom properties, the dijit renders and acts as if those properties were never defined.


  • ValidationTextBox? can let you define regExp, and maxLength properties in the markup, but at runtime, those properties are not reflected.
  • RadioButton? needs a name property (to handle grouping) but that property is not reflected at runtime.

These properties can be set programmatically (pending a bug report I submitted about RadioButton?...), but I wanted guidance on whether this is an actual bug or not. Thanks for your time.

Attachments (1) (3.0 KB) - added by kentonr 11 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by bill

Hmm, sounds like that should work and presumably what's in the article does work, so can you attach your test case?

comment:2 Changed 11 years ago by Douglas Hays

I don't think that article discusses adding widgetsInTemplate:true

Changed 11 years ago by kentonr

Attachment: added

comment:3 Changed 11 years ago by kentonr

Hi, sorry about being a little vague. I actually started with this article, and used a second article as reference to get dijits in the template. I've attached a ZIP which reproduces the issue.

If you inspect the radio button, the "name" property doesn't get passed (even though I set it in the template file). The validation text box acts like a normal text box (since it doesn't get the regExp, maxLength, invalidMessage, or required properties).

If you press the button, it will set the properties programmatically on the validation text box, which you can see works as expected.

comment:4 Changed 11 years ago by bill

Resolution: invalid
Status: newclosed

As explained in the release notes for 1.6, when you use data-dojo-type you need to specify all your parameters in data-dojo-props. However, this restriction has been lifted for 1.7.

Note: See TracTickets for help on using tickets.