IDEMPIERE-4165 Fixed NPE when onIgnore in form mode

This commit is contained in:
Diego Ruiz 2020-02-10 22:15:46 +01:00 committed by Carlos Ruiz
parent c50d8ff703
commit 74a84a9fa4
1 changed files with 9 additions and 5 deletions

View File

@ -2156,11 +2156,15 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
if (dirtyTabpanel != null) {
focusToTabpanel(dirtyTabpanel);
//ensure row indicator is not lost
RowRenderer<Object[]> renderer = dirtyTabpanel.getGridView().getListbox().getRowRenderer();
GridTabRowRenderer gtr = (GridTabRowRenderer)renderer;
org.zkoss.zul.Row row = gtr.getCurrentRow();
if (row != null)
gtr.setCurrentRow(row);
if (dirtyTabpanel.getGridView() != null &&
dirtyTabpanel.getGridView().getListbox() != null &&
dirtyTabpanel.getGridView().getListbox().getRowRenderer() != null) {
RowRenderer<Object[]> renderer = dirtyTabpanel.getGridView().getListbox().getRowRenderer();
GridTabRowRenderer gtr = (GridTabRowRenderer)renderer;
org.zkoss.zul.Row row = gtr.getCurrentRow();
if (row != null)
gtr.setCurrentRow(row);
}
}
else
focusToActivePanel();