IDEMPIERE-5500 Autorefresh of Table lists not working correctly (#1591)
* IDEMPIERE-5500 Autorefresh of Table lists not working correctly * - add back reset method as suggested by hengsin
This commit is contained in:
parent
2fa0d49ac4
commit
2870bd56c7
|
@ -1001,7 +1001,7 @@ ContextMenuListener, IZoomableEditor
|
|||
/**
|
||||
* generated serial
|
||||
*/
|
||||
private static final long serialVersionUID = 3543247404379028327L;
|
||||
private static final long serialVersionUID = 7813673017009600392L;
|
||||
private WTableDirEditor editor;
|
||||
|
||||
protected CCacheListener(String tableName, WTableDirEditor editor) {
|
||||
|
@ -1011,13 +1011,19 @@ ContextMenuListener, IZoomableEditor
|
|||
|
||||
@Override
|
||||
public int reset() {
|
||||
if (editor.getComponent().getDesktop() != null && editor.isReadWrite()) {
|
||||
refreshLookupList();
|
||||
}
|
||||
refreshLookupList();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int reset(int recordId) {
|
||||
refreshLookupList();
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void refreshLookupList() {
|
||||
if (editor.getComponent().getDesktop() == null || !editor.isReadWrite())
|
||||
return;
|
||||
Desktop desktop = editor.getComponent().getDesktop();
|
||||
boolean alive = false;
|
||||
if (desktop.isAlive() && desktop.getSession() != null) {
|
||||
|
@ -1041,9 +1047,7 @@ ContextMenuListener, IZoomableEditor
|
|||
|
||||
@Override
|
||||
public void newRecord(int record_ID) {
|
||||
if (editor.getComponent().getDesktop() != null && editor.isReadWrite()) {
|
||||
refreshLookupList();
|
||||
}
|
||||
refreshLookupList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue