Opened 13 years ago
Closed 12 years ago
#7300 closed defect (fixed)
dojox.dtl.HtmlTemplate cannot use arguments in tag attributes
Reported by: | Shane O'Sullivan | Owned by: | Neil Roberts |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | DojoX DTL | Version: | 1.1.1 |
Keywords: | DTL | Cc: | Neil Roberts |
Blocked By: | Blocking: |
Description
If a DTL template contains an argument in a tag attribute, DTL thinks that this is a URL and attempts to download it's contents.
E.g. <div>
{% for item in items %}
<a index="{{forloop.counter0}}" id="id_{{item.param}}">
{{item.param}}
</a>
{% endfor %}
</div>
Will break when a new dojox.dtl.HtmlTemplate? is created using this template. If the
id="id_{{item.param}}"
is removed, it works.
When using a standard dojox.dtl.Template, the above template works just fine.
Change History (11)
comment:1 Changed 13 years ago by
Owner: | changed from Adam Peller to Neil Roberts |
---|
comment:2 Changed 13 years ago by
comment:4 Changed 13 years ago by
comment:5 Changed 13 years ago by
It is still necessary to construct a Context object to pass to the render method of HtmlTemplate?, rather than it constructing one for you based on a JSON object.
comment:7 Changed 13 years ago by
Milestone: | tbd → 1.3 |
---|
Owners should mark these bugs w/a milestone (possibly future). Putting into 1.3 milestone temporarily (since 1.2RC has already been made)
comment:8 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Works ok for me in r15810 with dtl/demos/demo_HtmlTemplated.html
:
<button ... otherAttr2="x_{{item}}" >
gets rendered into (for "orange" values of item
)
<button ... otherAttr2="x_orange" >
Reopen if you can reproduce.
comment:9 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
i noticed the same issue - but i was able to make it work by changing the attribute to something other then "id". Once i changed the attribute to "name" the rendering worked fine. I am currently using the 1.2 build. Let me know if you need a code submission to reopen.
comment:10 Changed 12 years ago by
Component: | Dojox → DojoX DTL |
---|
comment:11 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Please only reopen if this occurs in trunk again, the releases have some issues with DTL
(In [14789]) Refs #7300. Figured I'd also get in: