Opened 13 years ago

Closed 13 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:


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: {


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) (20.9 KB) - added by Shane O'Sullivan 13 years ago.
files showing the problem

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by Shane O'Sullivan

Attachment: added

files showing the problem

comment:1 Changed 13 years ago by Shane O'Sullivan

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 13 years ago by Adam Peller

Owner: changed from Adam Peller to Neil Roberts

comment:3 Changed 13 years ago by Neil Roberts

Resolution: fixed
Status: newclosed

(In [16091]) Fixes #8283. Don't assume that child objects in a data store are items !strict

Note: See TracTickets for help on using tickets.