Sightly Code to iterate over Map which is list of String - Does not work in 6.3
Hi All,
We have sightly code which was working fine in 6.1 and stopped working in 6.3.
Code to iterate over Map which is a list of String.
Sightly (HTL)
<sly data-sly-use.table="${'my.models.Table'}">
<div>
<table data-sly-list.row="${table.rowList}">
<tr data-sly-list.columnCell="${table.rowList[row]}">
<td>
${columnCell}
</td>
</tr>
</table>
</div>
</sly>
Model Java:
Map<Integer,List<String>> myMap = new HashMap<Integer,List<String>>();
for(int i=1;i<=3;i++)
{
List<String> list = new ArrayList<String>();
list.add("" + i);
list.add("" + i*i);
list.add("" + i*i*i);
myMap.put(new Integer(i-1),list);
}
This sightly code stops working where ${table.rowList[row]} always returns null and hence inner loop does not execute.
Is there any change in 6.3 with respect to sightly where rowList[row] kind of notation is disabled ? Could not find something similar on google.
I also tried iterator way and passed the item in the array index. But that also does not solve the issue.