IDEMPIERE-913 NPE when saving query with look-up field not visible on window / thanks to Anthony Sossah (xolali)

it solves also IDEMPIERE-916 NPE in Tab : Included Roles
This commit is contained in:
Carlos Ruiz 2013-05-12 14:53:35 -05:00
parent 0855c6e79c
commit 5400d30443
2 changed files with 5 additions and 2 deletions

View File

@ -34,6 +34,8 @@ public class DefaultLookupFactory implements ILookupFactory{
@Override
public Lookup getLookup(GridFieldVO gridFieldVO) {
Lookup lookup = null;
if (gridFieldVO.lookupInfo == null) // IDEMPIERE-913
gridFieldVO.loadLookupInfo();
if (gridFieldVO.displayType == Location) // not cached
{
lookup = new MLocationLookup (gridFieldVO.ctx, gridFieldVO.WindowNo);

View File

@ -233,9 +233,10 @@ public class GridField
* @return lookup
*/
public Lookup getLookup()
{
{
if (m_lookup == null) loadLookupFromFactory(); // IDEMPIERE-913
return m_lookup;
} // getLookup
} // getLookup
/**
* Is this field a Lookup?.