【发布时间】:2017-01-12 08:42:05
【问题描述】:
我有以下ArrayList在前端迭代$SuitableRooms下:https://gist.github.com/anonymous/9db25ffe78b14463b7b4392f9da9d7f8
我可以毫无问题地浏览第一个维度的属性,例如。
<% loop $SuitableRooms %>
$Name <!-- returns "Grande Club Room" for example (correct) -->
<% loop $Top.SuitableRooms.Attributes %> // I know $Top.SuitableRooms isn't needed, just put this here to emphasise that I know I'm in the right scope
$Name <br/> <!-- should return "Smokers Allowed" for example but returns "Attributes" -->
<% end_loop %>
<% end_loop %>
应该返回:
高级俱乐部间
- 吸烟者允许
- 海景
- 等
但返回:
高级俱乐部间
- 属性
- 属性
- 属性
所以很明显问题出在我的 ArrayList 的结构上,虽然我无法找出我哪里出错了。
【问题讨论】:
-
在您的代码中,您调用的是
<% loop $Top.SuitableRooms.Attributes %>还是<% loop $Attributes %>? -
在所提供的上下文中,任何一个都是正确的,并且两者都可以工作@3dgoo - 找到我的问题并发布它