[ 2476692 ] Dynamic validation combobox failed to display current value

This commit is contained in:
Heng Sin Low 2008-12-30 08:17:49 +00:00
parent 61a018f5f5
commit 9fd9211728
1 changed files with 9 additions and 5 deletions

View File

@ -269,7 +269,7 @@ ContextMenuListener, IZoomableEditor
{
if (getComponent().getSelectedItem() == null)
{
setValue(null);
setValue(oldValue);
}
}
}
@ -297,15 +297,19 @@ ContextMenuListener, IZoomableEditor
public void actionRefresh()
{
Object curValue = getValue();
if (lookup != null)
{
Object curValue = getValue();
if (isReadWrite())
lookup.refresh();
refreshList();
if (curValue != null)
{
setValue(curValue);
}
}
}
/* (non-Javadoc)
* @see org.adempiere.webui.editor.IZoomableEditor#actionZoom()
@ -344,7 +348,7 @@ ContextMenuListener, IZoomableEditor
@Override
public void dynamicDisplay()
{
if (isReadWrite() && (lookup != null) && (!lookup.isValidated() || !lookup.isLoaded()))
if ((lookup != null) && (!lookup.isValidated() || !lookup.isLoaded()))
this.actionRefresh();
}
}