IDEMPIERE-924 Reloading find window set value from current record on advance tab instead of keeping selected value. Base on patch from Deepak.
This commit is contained in:
parent
747470b2f1
commit
c155937c9e
|
@ -1998,6 +1998,7 @@ public class GridField
|
|||
field.m_vo = field.m_vo.clone(ctx, field.m_vo.WindowNo, field.m_vo.TabNo,
|
||||
field.m_vo.AD_Window_ID, field.m_vo.AD_Tab_ID, field.m_vo.tabReadOnly);
|
||||
field.m_vo.lookupInfo = null;
|
||||
field.m_propertyChangeListeners = new PropertyChangeSupport(this);
|
||||
return field;
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new IllegalStateException(e.getLocalizedMessage(), e);
|
||||
|
|
|
@ -1603,42 +1603,42 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
|
|||
GridField field = getTargetMField(columnName);
|
||||
if(field == null) return new Label("");
|
||||
|
||||
GridField findField = (GridField) field.clone(m_findCtx);
|
||||
WEditor editor = null;
|
||||
if (field.isKey()
|
||||
|| (!DisplayType.isLookup(field.getDisplayType()) && DisplayType.isID(field.getDisplayType())))
|
||||
if (findField.isKey()
|
||||
|| (!DisplayType.isLookup(findField.getDisplayType()) && DisplayType.isID(findField.getDisplayType())))
|
||||
{
|
||||
editor = new WNumberEditor(field);
|
||||
editor = new WNumberEditor(findField);
|
||||
}
|
||||
else if (field.getDisplayType() == DisplayType.Button)
|
||||
else if (findField.getDisplayType() == DisplayType.Button)
|
||||
{
|
||||
if (columnName.endsWith("_ID"))
|
||||
{
|
||||
editor = new WNumberEditor(field);
|
||||
editor = new WNumberEditor(findField);
|
||||
} else {
|
||||
editor = new WStringEditor(field);
|
||||
editor = new WStringEditor(findField);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//reload lookupinfo for find window
|
||||
if (DisplayType.isLookup(field.getDisplayType()) )
|
||||
{
|
||||
GridField findField = (GridField) field.clone(m_findCtx);
|
||||
findField.loadLookupNoValidate();
|
||||
|
||||
//reload lookupinfo for find window
|
||||
if (DisplayType.isLookup(findField.getDisplayType()) )
|
||||
{
|
||||
findField.loadLookupNoValidate();
|
||||
editor = WebEditorFactory.getEditor(findField, true);
|
||||
findField.addPropertyChangeListener(editor);
|
||||
}
|
||||
else
|
||||
{
|
||||
editor = WebEditorFactory.getEditor(field, true);
|
||||
field.addPropertyChangeListener(editor);
|
||||
editor = WebEditorFactory.getEditor(findField, true);
|
||||
findField.addPropertyChangeListener(editor);
|
||||
}
|
||||
}
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new WStringEditor(field);
|
||||
field.addPropertyChangeListener(editor);
|
||||
editor = new WStringEditor(findField);
|
||||
findField.addPropertyChangeListener(editor);
|
||||
}
|
||||
|
||||
editor.addValueChangeListener(this);
|
||||
|
|
Loading…
Reference in New Issue