IDEMPIERE-1248 Performance Optimization: Eliminate the fire and processing of duplicate event. Fixed problem with window that have no records ( reported by Carlos ).
This commit is contained in:
parent
4ffff17e3b
commit
4ef6a5d163
|
@ -667,10 +667,14 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
||||||
//0 and -1 is same
|
//0 and -1 is same
|
||||||
if (col < 0)
|
if (col < 0)
|
||||||
col = 0;
|
col = 0;
|
||||||
|
int currentRow = getGridTab().isSortTab() ? 0 : getGridTab().getCurrentRow();
|
||||||
Execution exec = Executions.getCurrent();
|
Execution exec = Executions.getCurrent();
|
||||||
if (exec.getAttribute(ON_DYNAMIC_DISPLAY_CALL_EVENT_ATTR+"_"+col) == null)
|
StringBuilder builder = new StringBuilder(ON_DYNAMIC_DISPLAY_CALL_EVENT_ATTR).append("_")
|
||||||
|
.append(col).append("_").append(currentRow);
|
||||||
|
String key = builder.toString();
|
||||||
|
if (exec.getAttribute(key) == null)
|
||||||
{
|
{
|
||||||
exec.setAttribute(ON_DYNAMIC_DISPLAY_CALL_EVENT_ATTR+"_"+col, Boolean.TRUE);
|
exec.setAttribute(key, Boolean.TRUE);
|
||||||
Events.sendEvent(ON_DYNAMIC_DISPLAY_CALL_EVENT, this, col);
|
Events.sendEvent(ON_DYNAMIC_DISPLAY_CALL_EVENT, this, col);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue