IDEMPIERE-1318 Casting problem on BOM Viewer window. Base on patch from Richard Morales Herrera.

This commit is contained in:
Heng Sin Low 2013-09-04 23:50:02 +08:00
parent 97663971b5
commit a26f603e75
1 changed files with 8 additions and 5 deletions

View File

@ -159,11 +159,14 @@ public class SimpleTreeModel extends org.zkoss.zul.DefaultTreeModel<Object> impl
}
// Color
final MTreeNode mNode = (MTreeNode) ((DefaultTreeNode<?>) node).getData();
Color color = mNode.getColor();
if (color != null){
String hex = ZkCssHelper.createHexColorString(color);
ZkCssHelper.appendStyle(tc, "color: #" + hex);
Object data = ((DefaultTreeNode<?>) node).getData();
if (data instanceof MTreeNode) {
final MTreeNode mNode = (MTreeNode) data;
Color color = mNode.getColor();
if (color != null){
String hex = ZkCssHelper.createHexColorString(color);
ZkCssHelper.appendStyle(tc, "color: #" + hex);
}
}
// End color
}else{