IDEMPIERE-1242 NPE results in Calendar Year and Period window.
This commit is contained in:
parent
7badfa1db9
commit
426909fd42
|
@ -2432,6 +2432,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
{
|
||||
final IADTabpanel adtabPanel = findADTabpanel(wButton);
|
||||
boolean startWOasking = false;
|
||||
if (adtabPanel == null) {
|
||||
return;
|
||||
}
|
||||
final int table_ID = adtabPanel.getGridTab().getAD_Table_ID();
|
||||
|
||||
// Record_ID
|
||||
|
|
|
@ -792,7 +792,16 @@ public class CompositeADTabbox extends AbstractADTabbox
|
|||
if (headerTab.getGridTab().isNew()) {
|
||||
tabPanel.resetDetailForNewParentRecord();
|
||||
} else {
|
||||
//maintain detail row position if possible
|
||||
int currentRow = -1;
|
||||
if (!tabPanel.getGridTab().isSortTab()) {
|
||||
currentRow = tabPanel.getGridTab().getCurrentRow();
|
||||
}
|
||||
tabPanel.query(false, 0, 0);
|
||||
if (currentRow >= 0 && currentRow != tabPanel.getGridTab().getCurrentRow()
|
||||
&& currentRow < tabPanel.getGridTab().getRowCount()) {
|
||||
tabPanel.getGridTab().setCurrentRow(currentRow, false);
|
||||
}
|
||||
}
|
||||
if (!tabPanel.isVisible()) {
|
||||
tabPanel.setVisible(true);
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.util.Map.Entry;
|
|||
import java.util.Properties;
|
||||
|
||||
import org.adempiere.util.GridRowCtx;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.Checkbox;
|
||||
import org.adempiere.webui.component.EditorBox;
|
||||
import org.adempiere.webui.component.NumberBox;
|
||||
|
@ -118,7 +119,6 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
|
|||
{
|
||||
if (buttonListener != null)
|
||||
{
|
||||
((WButtonEditor)editor).removeActionListener(buttonListener);
|
||||
((WButtonEditor)editor).addActionListener(buttonListener);
|
||||
}
|
||||
else
|
||||
|
@ -285,7 +285,11 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
|
|||
entry.getKey().removePropertyChangeListener(entry.getValue());
|
||||
entry.getValue().removeValuechangeListener(dataBinder);
|
||||
|
||||
div.appendChild(component);
|
||||
if (component.getParent() == null || component.getParent() != div)
|
||||
div.appendChild(component);
|
||||
else if (!component.isVisible()) {
|
||||
component.setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -495,9 +499,13 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
|
|||
|
||||
org.zkoss.zul.Column column = (org.zkoss.zul.Column) columns.getChildren().get(colIndex);
|
||||
if (column.isVisible()) {
|
||||
Cell div = (Cell) currentRow.getChildren().get(colIndex);
|
||||
div.getChildren().clear();
|
||||
Cell div = (Cell) currentRow.getChildren().get(colIndex);
|
||||
WEditor editor = getEditorCell(gridPanelFields[i]);
|
||||
if (div.getChildren().isEmpty() || !(div.getChildren().get(0) instanceof Button))
|
||||
div.getChildren().clear();
|
||||
else if (!div.getChildren().isEmpty()) {
|
||||
div.getChildren().get(0).setVisible(false);
|
||||
}
|
||||
div.appendChild(editor.getComponent());
|
||||
WEditorPopupMenu popupMenu = editor.getPopupMenu();
|
||||
|
||||
|
|
Loading…
Reference in New Issue