IDEMPIERE-887 Zk: Organization tree lookup show broken images.

This commit is contained in:
Heng Sin Low 2013-04-26 16:54:36 +08:00
parent eba3553ec0
commit 925d59c47c
1 changed files with 11 additions and 0 deletions

View File

@ -244,6 +244,17 @@ public class TreeSearchPanel extends Panel implements EventListener<Event>, Tree
treeValues[i] = mNode.getName(); treeValues[i] = mNode.getName();
treeDescription[i] = mNode.getDescription(); treeDescription[i] = mNode.getDescription();
String imagePath = mNode.getImagePath(); String imagePath = mNode.getImagePath();
if (imagePath != null)
{
if (imagePath.startsWith("/images"))
{
imagePath = ThemeManager.getThemeResource(imagePath.substring(1));
}
else if (imagePath.startsWith("images"))
{
imagePath = ThemeManager.getThemeResource(imagePath);
}
}
treeImages[i] = imagePath != null ? imagePath.intern() : null; treeImages[i] = imagePath != null ? imagePath.intern() : null;
} }
} }