Opened 10 years ago
Closed 10 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: |
Description
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.
Examples:
- 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)
Change History (5)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
I don't think that article discusses adding widgetsInTemplate:true
Changed 10 years ago by
Attachment: | testcustomwidget.zip added |
---|
comment:3 Changed 10 years ago by
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 10 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.
Hmm, sounds like that should work and presumably what's in the article does work, so can you attach your test case?