cancel
Showing results for 
Search instead for 
Did you mean: 

icon16/32 always pointing to _default

jsauer
Champ in-the-making
Champ in-the-making
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 JavaScript
list.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 though
list.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?

Thanks
Jörg
1 REPLY 1

jboss
Champ in-the-making
Champ in-the-making
Having this exact same problem, is there resolution for this somewhere?   Or have not enough people mentioned it?  Thanks for any advice from anyone with the same problem.