summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Pòˆntelin <teemu@vaadin.com>2014-05-22 21:22:09 +0300
committerVaadin Code Review <review@vaadin.com>2014-06-18 06:23:43 +0000
commit26f74f5b45dc5d7c2646b792d1ac12851eed1285 (patch)
tree60d30db54dd6fc9bd3c91496c3342cceeb289c73 /client
parent3200aecd5d7c55aadc3142025221b4cc87bd2e22 (diff)
downloadvaadin-framework-26f74f5b45dc5d7c2646b792d1ac12851eed1285.tar.gz
vaadin-framework-26f74f5b45dc5d7c2646b792d1ac12851eed1285.zip
Fixed an NPE while changing a DateField from 24 to 12h clock (#13722)
A client-side NullPointerException was fixed by not reusing the existing VTime panel and always recreating it instead. Otherwise the ListBox for switching between AM/PM might have been null. Change-Id: I8d54d91627043a12b52ac5d5e54d6f7a729af1ac
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VCalendarPanel.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/VCalendarPanel.java b/client/src/com/vaadin/client/ui/VCalendarPanel.java
index d8c96917d8..eaa2292c69 100644
--- a/client/src/com/vaadin/client/ui/VCalendarPanel.java
+++ b/client/src/com/vaadin/client/ui/VCalendarPanel.java
@@ -813,14 +813,12 @@ public class VCalendarPanel extends FocusableFlexTable implements
buildCalendarBody();
}
- if (isTimeSelectorNeeded() && time == null) {
+ if (isTimeSelectorNeeded()) {
time = new VTime();
setWidget(2, 0, time);
getFlexCellFormatter().setColSpan(2, 0, 5);
getFlexCellFormatter().setStyleName(2, 0,
parent.getStylePrimaryName() + "-calendarpanel-time");
- } else if (isTimeSelectorNeeded()) {
- time.updateTimes();
} else if (time != null) {
remove(time);
}