IDEMPIERE-5486 - Advanced Search: Date Fields - NullPointerException (#1576)
This commit is contained in:
parent
2e0317e54c
commit
25de35dbe0
|
@ -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();
|
||||||
listcell.setAttribute("value", evt.getNewValue());
|
if(parent != null) {
|
||||||
|
if(parent instanceof ListCell) {
|
||||||
|
listcell = (ListCell) parent;
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue