Problem with FindWindow

Description

Noticed a small problem with the FindWindow.

Log into Garden World (postgres.adempiere.io), open the Sales Order window. Search using the advanced tab for Document Status = Completed.

This will work the first time. Search again and change the operator to !=.
The Doc Status editor appears empty.

I debugged it to an issue with how the WTableDirEditor list is created. The editor is only refreshed if read/write. It is initially created as read only so it has to be changed to read/write and then refreshed.

@@ -62,6 +62,7 @@
import org.adempiere.webui.editor.WEditor;
import org.adempiere.webui.editor.WNumberEditor;
import org.adempiere.webui.editor.WStringEditor;
+import org.adempiere.webui.editor.WTableDirEditor;
import org.adempiere.webui.editor.WebEditorFactory;
import org.adempiere.webui.event.ValueChangeEvent;
import org.adempiere.webui.event.ValueChangeListener;
@@ -1560,6 +1561,11 @@
editor.setReadWrite(enabled);
editor.setVisible(enabled);
editor.dynamicDisplay();
+ // Table Direct Editors don't update the lookups if not read enabled
+ // So we have to do this after setting the ReadWrite
+ if (enabled && editor instanceof WTableDirEditor) {
+ ((WTableDirEditor) editor).actionRefresh();
+ }
//
return editor.getComponent();

Environment

ZK

Assignee

Victor Perez Juarez

Reporter

Michael McKay

Labels

None

Time tracking

1h

Fix versions

Priority

Minor
Configure