Opened 8 years ago

Closed 7 years ago

#14791 closed defect (wontfix)

nested Repeats

Reported by: Stefan Meyer Owned by: Ed Chatelain
Priority: undecided Milestone: tbd
Component: DojoX MVC Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:

Description

There is a scoping problem with Repeat-Containers. Since the innerHTML of the outermost Repeat is handled as a template, all placeholders inside of it are substituted - even the once in the inner Repeats. Only afterwards will the inner Repeats create their templates. Changing the exprchar in the inner repeats is a workaround. Somehow the templating inside a dojox.mvc.Output is "sometimes" affected.

<ol dojoType="dojox.mvc.Repeat" exprchar="#" >
 <li data-dojo-type="dojox.mvc.Group" data-dojo-props="ref: '#{this.index}'" >
  <span data-dojo-type="dojox.mvc.Output" data-dojo-props="ref: 'imageUrl'">#{this.value}</span>
  <ol id="stepgroup#{this.index}" dojoType="dojox.mvc.Repeat" exprchar="%" data-dojo-props="ref: 'children'">
   <li data-dojo-type="dojox.mvc.Group" data-dojo-props="ref: '%{this.index}'"> 
    <span data-dojo-type="dojox.mvc.Output" data-dojo-props="ref: 'description'">%{this.value}</span> 
   </li> 
  </ol>
 </li>
</ol>

Assuming that the dijit-structure in the repeat container is not changed by the template evaluation, creating all templates first an then evaluating the templates would be a solution.

Change History (1)

comment:1 Changed 7 years ago by Ed Chatelain

Resolution: wontfix
Status: newclosed

If you use a different exprchar it should work, but mvc/WidgetList in 1.8 provides a similar function to mvc/Repeat, and it works nested. An example can be seen here: http://archive.dojotoolkit.org/nightly/checkout/dojox/mvc/tests/WidgetList_tests/test_nested_widgetLists-jsonRest-ins-del.html

So I am going to close this.

Note: See TracTickets for help on using tickets.