From 2a7ef9dda31c0a6fc52c02d7d4b8ccfae498caaa Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 16 Oct 2013 17:20:07 -0500 Subject: [PATCH] hg backout f3dd4e22afdf / IDEMPIERE-1364 --- .../WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 96c5717477..702a9ea97c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -52,6 +52,7 @@ import org.adempiere.webui.editor.WebEditorFactory; import org.adempiere.webui.event.ContextMenuListener; import org.adempiere.webui.panel.HelpController; import org.adempiere.webui.util.GridTabDataBinder; +import org.adempiere.webui.util.TreeUtils; import org.adempiere.webui.window.FDialog; import org.compiere.model.DataStatusEvent; import org.compiere.model.DataStatusListener; @@ -1292,7 +1293,9 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer if (recordId <= 0) return; //force on init render - treePanel.getTree().onInitRender(); + if (TreeUtils.isOnInitRenderPosted(treePanel.getTree()) || treePanel.getTree().getTreechildren() == null) { + treePanel.getTree().onInitRender(); + } SimpleTreeModel model = (SimpleTreeModel)(TreeModel) treePanel.getTree().getModel(); if (treePanel.getTree().getSelectedItem() != null) {