IDEMPIERE-927 Info window display -1 instead of a blank cell when pointing to AD_User table / based on Nicolas Micoud patch

This commit is contained in:
Carlos Ruiz 2013-05-28 17:27:00 -05:00
parent e86b7ab0d6
commit 603ddd7bc0
1 changed files with 14 additions and 10 deletions

View File

@ -488,22 +488,26 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
{ {
String display = rs.getString(colIndex); String display = rs.getString(colIndex);
int key = rs.getInt(colIndex+1); int key = rs.getInt(colIndex+1);
value = new KeyNamePair(key, display); if (! rs.wasNull()) {
value = new KeyNamePair(key, display);
}
colOffset++; colOffset++;
} }
else else
{ {
int key = rs.getInt(colIndex); int key = rs.getInt(colIndex);
WEditor editor = editorMap.get(p_layout[col].getColSQL()); if (! rs.wasNull()) {
if (editor != null) WEditor editor = editorMap.get(p_layout[col].getColSQL());
{ if (editor != null)
editor.setValue(key); {
value = new KeyNamePair(key, editor.getDisplayTextForGridView(key)); editor.setValue(key);
} value = new KeyNamePair(key, editor.getDisplayTextForGridView(key));
else }
{ else
value = new KeyNamePair(key, Integer.toString(key)); {
value = new KeyNamePair(key, Integer.toString(key));
}
} }
} }
} }