IDEMPIERE-691 Zk Combobox: Navigation using arrow key is broken.
This commit is contained in:
parent
7cbf260bf9
commit
c7d4c612bb
|
@ -87,6 +87,8 @@ ContextMenuListener, IZoomableEditor
|
||||||
|
|
||||||
private CCacheListener tableCacheListener;
|
private CCacheListener tableCacheListener;
|
||||||
|
|
||||||
|
private boolean onselecting = false;
|
||||||
|
|
||||||
public WTableDirEditor(GridField gridField)
|
public WTableDirEditor(GridField gridField)
|
||||||
{
|
{
|
||||||
super(new EditorCombobox(), gridField);
|
super(new EditorCombobox(), gridField);
|
||||||
|
@ -247,6 +249,10 @@ ContextMenuListener, IZoomableEditor
|
||||||
|
|
||||||
public void setValue(Object value)
|
public void setValue(Object value)
|
||||||
{
|
{
|
||||||
|
if (onselecting) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (value != null && (value instanceof Integer || value instanceof String))
|
if (value != null && (value instanceof Integer || value instanceof String))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -373,12 +379,17 @@ ContextMenuListener, IZoomableEditor
|
||||||
{
|
{
|
||||||
if (Events.ON_SELECT.equalsIgnoreCase(event.getName()))
|
if (Events.ON_SELECT.equalsIgnoreCase(event.getName()))
|
||||||
{
|
{
|
||||||
Object newValue = getValue();
|
try {
|
||||||
if (isValueChange(newValue)) {
|
onselecting = true;
|
||||||
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
|
Object newValue = getValue();
|
||||||
super.fireValueChange(changeEvent);
|
if (isValueChange(newValue)) {
|
||||||
oldValue = newValue;
|
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
|
||||||
}
|
super.fireValueChange(changeEvent);
|
||||||
|
oldValue = newValue;
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
onselecting = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (Events.ON_BLUR.equalsIgnoreCase(event.getName()))
|
else if (Events.ON_BLUR.equalsIgnoreCase(event.getName()))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue