Ticket #5226 (assigned defect)
dijit._Templated does not replace booleans correctly
| Reported by: | guest | Owned by: | alex |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | critical | Keywords: | |
| Cc: | ptwobrussell@… |
Description (last modified by ptwobrussell) (diff)
If a widget contains e.g:
myBool: false
and your template contains:
<div dojoType="myWidget" value="${myBool}"></div>
value is evaluated to true.
This happened after changeset r10979 when the following was added on line 64 in the buildRendering function:
if(!value){ return ""; }
The buildRendering function now replaces ${myBool} with "" instead of "false".
After this the str2obj function is called in the dojo parser. In the boolean case the following code is run:
return typeof value == "boolean" ? value : !(value.toLowerCase()=="false");
Since value is "" it returns true.
Regards, Thomas
Attachments
Change History
Note: See
TracTickets for help on using
tickets.