IDEMPIERE-968 - Can't use WLocationEditor.setValue from a form

This commit is contained in:
Nicolas Micoud 2013-05-28 12:59:14 +02:00
parent 091e5b333d
commit 497cf480af
1 changed files with 4 additions and 1 deletions

View File

@ -117,7 +117,10 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, Pr
}
else
{
String trxName = this.gridField.getGridTab().getTableModel().get_TrxName();
String trxName = null; // could be null if called from a form
if (this.gridField != null)
trxName = this.gridField.getGridTab().getTableModel().get_TrxName();
m_value = m_Location.getLocation(value, trxName);
if (m_value == null)
getComponent().setText("<" + value + ">");