diff options
-rw-r--r-- | src/com/itmill/toolkit/ui/Table.java | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/com/itmill/toolkit/ui/Table.java b/src/com/itmill/toolkit/ui/Table.java index fe8d7b18bc..29f38ce347 100644 --- a/src/com/itmill/toolkit/ui/Table.java +++ b/src/com/itmill/toolkit/ui/Table.java @@ -3025,19 +3025,22 @@ public class Table extends AbstractSelect implements Action.Container, // Virtually identical to AbstractCompoenentContainer.setEnabled(); public void requestRepaintAll() { requestRepaint(); - for (Iterator childIterator = visibleComponents.iterator(); childIterator - .hasNext();) { - Component c = (Component) childIterator.next(); - if (c instanceof Form) { - // Form has children in layout, but is not ComponentContainer - c.requestRepaint(); - ((Form) c).getLayout().requestRepaintAll(); - } else if (c instanceof Table) { - ((Table) c).requestRepaintAll(); - } else if (c instanceof ComponentContainer) { - ((ComponentContainer) c).requestRepaintAll(); - } else { - c.requestRepaint(); + if (visibleComponents != null) { + for (Iterator childIterator = visibleComponents.iterator(); childIterator + .hasNext();) { + Component c = (Component) childIterator.next(); + if (c instanceof Form) { + // Form has children in layout, but is not + // ComponentContainer + c.requestRepaint(); + ((Form) c).getLayout().requestRepaintAll(); + } else if (c instanceof Table) { + ((Table) c).requestRepaintAll(); + } else if (c instanceof ComponentContainer) { + ((ComponentContainer) c).requestRepaintAll(); + } else { + c.requestRepaint(); + } } } } |