IDEMPIERE-670 Window tree lookup result have the same icon. Do not show folder icon for leaf node.

This commit is contained in:
Heng Sin Low 2013-05-03 15:44:51 +08:00
parent 32f5ee1ad9
commit 267c1ca86a
1 changed files with 16 additions and 11 deletions

View File

@ -33,6 +33,7 @@ import org.adempiere.webui.util.TreeUtils;
import org.compiere.model.MTreeNode;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.zkoss.zk.au.out.AuScript;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
@ -243,6 +244,9 @@ public class TreeSearchPanel extends Panel implements EventListener<Event>, Tree
MTreeNode mNode = (MTreeNode) sNode.getData();
treeValues[i] = mNode.getName();
treeDescription[i] = mNode.getDescription();
String indicator = mNode.getImageIndiactor();
if (!Util.isEmpty(indicator) || mNode.isSummary())
{
String imagePath = mNode.getImagePath();
if (imagePath != null)
{
@ -258,6 +262,7 @@ public class TreeSearchPanel extends Panel implements EventListener<Event>, Tree
treeImages[i] = imagePath != null ? imagePath.intern() : null;
}
}
}
cmbSearch.setDescription(treeDescription);
cmbSearch.setDict(treeValues);