IDEMPIERE-5486 - Advanced Search: Date Fields - NullPointerException (#1576)

This commit is contained in:
Peter Takács 2022-11-23 09:59:37 +01:00 committed by GitHub
parent 2e0317e54c
commit 25de35dbe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 2 deletions

View File

@ -3282,8 +3282,20 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
if (winMain.getComponent().getSelectedIndex() == 1) if (winMain.getComponent().getSelectedIndex() == 1)
{ {
Component component = editor.getComponent(); Component component = editor.getComponent();
listcell = (ListCell)component.getParent(); Component parent = component.getParent();
if(parent != null) {
if(parent instanceof ListCell) {
listcell = (ListCell) parent;
listcell.setAttribute("value", evt.getNewValue()); listcell.setAttribute("value", evt.getNewValue());
}
else { // use case: Date To editor with Date Range Button
Component secondParent = parent.getParent();
if(secondParent instanceof ListCell) {
listcell = (ListCell) secondParent;
listcell.setAttribute("value", evt.getNewValue());
}
}
}
ctx = m_advanceCtx; ctx = m_advanceCtx;
} }
else else