1
我有以下ArrayList
其在前端迭代$SuitableRooms
下:https://gist.github.com/anonymous/9db25ffe78b14463b7b4392f9da9d7f8參數ArrayData構造必須是一個對象或關聯數組
我可以沒有問題例如導航第一尺寸的性質。
<% 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雖然上午的結構無法找出我出錯的地方。
在你的代碼把定義中,你調用'<%循環$頂部.SuitableRooms.Attributes%>或'<%loop $ Attributes%>'? – 3dgoo
在上下文中提供的是正確的,兩者都可以工作@ 3dgoo - 找到我的問題併發布它 – zanderwar