comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PeriodPanel.java @ 8629:97365575da6f

Handle the case where the period panel is used in a state without start and end
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 26 Mar 2015 12:07:43 +0100
parents 289486a43be8
children 5e38e2924c07
comparison
equal deleted inserted replaced
8628:a5439a609625 8629:97365575da6f
95 layout.addMember(form); 95 layout.addMember(form);
96 96
97 /* Try to find default values for the periods */ 97 /* Try to find default values for the periods */
98 Data start = getData(data.getAll(), startName); 98 Data start = getData(data.getAll(), startName);
99 Data end = getData(data.getAll(), endName); 99 Data end = getData(data.getAll(), endName);
100 if (start.getItems() == null || end.getItems() == null) { 100 if (start == null || end == null ||
101 start.getItems() == null || end.getItems() == null) {
101 return layout; 102 return layout;
102 } 103 }
103 104
104 for (DataItem item: start.getItems()) { 105 for (DataItem item: start.getItems()) {
105 if (item.getLabel().equals("default")) { 106 if (item.getLabel().equals("default")) {

http://dive4elements.wald.intevation.org