Opened 12 years ago
Closed 12 years ago
#8283 closed defect (fixed)
dojox.dtl breaks when a data store item is a complex object
Reported by: | Shane O'Sullivan | Owned by: | Neil Roberts |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Dojox | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When a template is used in conjunction with a data store binding, if the data store returns a JSON object as an item and you want to print an attribute of this object, DTL fails to render the template.
For example, if an item is like: {
title:{
text: "This is the title", type: "plain-text"
}
}
using {{ item.text }}
will of course just print out Object?
but {{ item.text.title }} breaks. I have attached a ZIP of a test page, template and source Atom file for the AtomReadStore?
Attachments (1)
Change History (4)
Changed 12 years ago by
Attachment: | TestDTL_data.zip added |
---|
comment:1 Changed 12 years ago by
There was a typo in the bug report. Instead of {{ item.text.title }} it should be {{ item.title.text }}
Also, I tried to print "[" + "+ Object +?" + "]" but Trac seems to try to execute a macro
comment:2 Changed 12 years ago by
Owner: | changed from Adam Peller to Neil Roberts |
---|
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
files showing the problem