Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4231 closed defect (fixed)

Declaration: can't use ${} inside attributes

Reported by: bill Owned by:
Priority: high Milestone: 0.9
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

Simple testcase here:

<div dojoType="dijit.Declaration" widgetClass="Employee" defaults="{ empid: 123, name: '' }">	
	<span>${name}</span>
	<a href="update.php?id=${empid}">update</a>
	<a href="delete.php?id=${empid}">delete</a>
</div>
<div dojoType="Employee" empid="100" name="Alan Allen"></div>

The { from ${empid} gets converted to %7B because it's inside an attribute.

Change History (5)

comment:1 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [10302]) Fixes #4231: can't use ${} in attributes in dojo.Declaration

comment:2 Changed 12 years ago by alex

(In [10303]) fixing scoped execution of connections for Declarations. Refs #4231

comment:3 Changed 12 years ago by Adam Peller

why not use dojo.string.substitute to be consistent with other templates?

comment:4 Changed 12 years ago by bill

It is using dojo.string.substitute. As a matter of fact it extends _Templated and thus it's running the exact same code. The problem was upstream.

comment:5 Changed 12 years ago by bill

(In [10309]) fix test title and tabbing. refs #4231.

Note: See TracTickets for help on using tickets.