comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/AddTableDataHelper.java @ 9077:2b13de1b0897

moved single_year/multi_year common code to AbstractPanel
author gernotbelger
date Tue, 22 May 2018 15:32:00 +0200
parents 766890addcb2
children
comparison
equal deleted inserted replaced
9076:22d8928895a1 9077:2b13de1b0897
62 62
63 this.select.appendChild(meta); 63 this.select.appendChild(meta);
64 64
65 } 65 }
66 66
67 public void addRow(final Map<String, String> colValMap) throws Exception { 67 public void addRow(final Map<String, String> colValMap) {
68 68
69 final Element item = this.creator.create("item"); 69 final Element item = this.creator.create("item");
70 70
71 for (final Entry<String, String> entry : colValMap.entrySet()) { 71 for (final Entry<String, String> entry : colValMap.entrySet()) {
72 if (this.meta.containsKey(entry.getKey())) { 72 if (this.meta.containsKey(entry.getKey())) {
73 this.creator.addAttr(item, entry.getKey(), entry.getValue() != null ? entry.getValue().toString() : ""); 73 this.creator.addAttr(item, entry.getKey(), entry.getValue() != null ? entry.getValue().toString() : "");
74 } else { 74 } else {
75 throw new Exception("Error: No such column " + entry.getKey()); 75 try {
76 throw new Exception("Error: No such column " + entry.getKey());
77 }
78 catch (final Exception e) {
79 e.printStackTrace();
80 }
76 } 81 }
77 } 82 }
78 this.select.appendChild(item); 83 this.select.appendChild(item);
79 } 84 }
80 85

http://dive4elements.wald.intevation.org