From 603ddd7bc0e9db300e08be8527346d1c009b3fa9 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 28 May 2013 17:27:00 -0500 Subject: [PATCH] IDEMPIERE-927 Info window display -1 instead of a blank cell when pointing to AD_User table / based on Nicolas Micoud patch --- .../org/adempiere/webui/panel/InfoPanel.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index 42f7d848df..ddb1886a67 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -488,22 +488,26 @@ public abstract class InfoPanel extends Window implements EventListener, { String display = rs.getString(colIndex); int key = rs.getInt(colIndex+1); - value = new KeyNamePair(key, display); + if (! rs.wasNull()) { + value = new KeyNamePair(key, display); + } colOffset++; } else { int key = rs.getInt(colIndex); - WEditor editor = editorMap.get(p_layout[col].getColSQL()); - if (editor != null) - { - editor.setValue(key); - value = new KeyNamePair(key, editor.getDisplayTextForGridView(key)); - } - else - { - value = new KeyNamePair(key, Integer.toString(key)); + if (! rs.wasNull()) { + WEditor editor = editorMap.get(p_layout[col].getColSQL()); + if (editor != null) + { + editor.setValue(key); + value = new KeyNamePair(key, editor.getDisplayTextForGridView(key)); + } + else + { + value = new KeyNamePair(key, Integer.toString(key)); + } } } }