Hi, just figured out a strange behaviour when displaying the filetypes icon through the icon16/icon32 properties.It never works if I pass a collection of nodes to the model through JavaScriptlist.get.js:
model.documents = node.children
list.get.json.ftl
<#list documents as doc>
{
"Name" : "${doc.name}",
"Type" : "${doc.type}",
"Icon16": "${url.context}${doc.icon16}",
"Icon32": "${url.context}${doc.icon32}",
…
I always end up getting _default.gif If I pass the folder thoughlist.get.js:
if(node.isContainer) {
model.folder = node
}
else {
model.folder = node.parent
}
list.get.json.ftl
<#list folder.children as doc>
{
"Name" : "${doc.name}",
"Type" : "${doc.type}",
"Icon16": "${url.context}${doc.icon16}",
"Icon32": "${url.context}${doc.icon32}",
…
it works!Any reasons for this behaviour? Should work both ways, shouldn't it?ThanksJörg